EMMA Coverage Report (generated Tue Dec 18 20:38:46 CET 2007)
[all classes][cz.vutbr.feec.packets.rtcp]

## COVERAGE SUMMARY FOR SOURCE FILE [ByePacketTest.java]

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
ByePacketTest.java | 100% (1/1) | 100% (2/2) | 94% (132/140) | 98% (26,5/27)

### COVERAGE BREAKDOWN BY CLASS AND METHOD

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
class ByePacketTest | 100% (1/1) | 100% (2/2) | 94% (132/140) | 98% (26,5/27)
testByePacket (): void |  | 100% (1/1) | 94% (125/133) | 98% (24,5/25)
ByePacketTest (): void |  | 100% (1/1) | 100% (7/7) | 100% (2/2)

1 | package cz.vutbr.feec.packets.rtcp;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 |
6 | import cz.vutbr.feec.packets.PacketGenerateException;
7 | import cz.vutbr.feec.packets.PacketParseException;
8 |
9 | public class ByePacketTest {
10 |
11 | byte[] buffer = new byte[100];
12 |
13 | @Test
14 | public void testByePacket() throws PacketParseException,
15 | PacketGenerateException {
16 | ByePacket byePacket = new ByePacket();
17 | byePacket.setVersion(2);
18 | byePacket.setPadding(1);
19 | byePacket.setPayloadtype(203);
20 | byePacket.setLength(20);
21 |
22 | byePacket.addSSRC(111111L);
23 | byePacket.addSSRC(222222L);
24 | byePacket.addSSRC(333333L);
25 | byePacket.addSSRC(444444L);
26 |
27 | // nastavuje se samo dle poctu vlozenych prvku
28 | // byePacket.setSourceCount(byePacket.getSSRCCount());
29 |
30 | byePacket.setLengthBlock(50);
31 | byePacket.setReasonText("Cau");
32 |
33 | int length = byePacket.generate(buffer, 0);
34 | ByePacket byePacketParse = new ByePacket();
35 | int length2 = byePacketParse.parse(buffer, 0, length);
36 |
37 | Assert.assertTrue(length % 4 == 0);
38 | Assert.assertTrue(length == length2);
39 | Assert.assertTrue(byePacket.getVersion() == byePacketParse.getVersion());
40 | Assert.assertTrue(byePacket.getPadding() == byePacketParse.getPadding());
41 | Assert.assertTrue(byePacket.getSourceCount() == byePacketParse.getSourceCount());
42 | Assert.assertTrue(byePacket.getPayloadtype() == byePacketParse.getPayloadtype());
43 | Assert.assertTrue(byePacket.getLength() == byePacketParse.getLength());
44 | Assert.assertTrue(byePacket.getLengthBlock() == byePacketParse.getLengthBlock());
45 |
46 | Assert.assertTrue(byePacket.equals(byePacketParse));
47 |
48 | Assert.assertTrue(byePacket.equals(byePacketParse));
49 | }
50 | }

[all classes][cz.vutbr.feec.packets.rtcp]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov