Sho SHIMIZU
Committed by Brian O'Connor

Use LF as line separator

Change-Id: I8ce85c95939365118d6dd3320ef8a36f89c4a1e5
Showing 55 changed files with 2219 additions and 2124 deletions
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.AdministrativeGroupTlv; 21 +import org.onosproject.pcepio.types.AdministrativeGroupTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the AdministrativeGroupTlv. 24 + * Test of the AdministrativeGroupTlv.
25 - */ 25 + */
26 -public class AdministrativeGroupTlvTest { 26 +public class AdministrativeGroupTlvTest {
27 - private final AdministrativeGroupTlv tlv1 = AdministrativeGroupTlv.of(1); 27 + private final AdministrativeGroupTlv tlv1 = AdministrativeGroupTlv.of(1);
28 - private final AdministrativeGroupTlv sameAsTlv1 = AdministrativeGroupTlv.of(1); 28 + private final AdministrativeGroupTlv sameAsTlv1 = AdministrativeGroupTlv.of(1);
29 - private final AdministrativeGroupTlv tlv2 = AdministrativeGroupTlv.of(2); 29 + private final AdministrativeGroupTlv tlv2 = AdministrativeGroupTlv.of(2);
30 - 30 +
31 - @Test 31 + @Test
32 - public void basics() { 32 + public void basics() {
33 - new EqualsTester() 33 + new EqualsTester()
34 - .addEqualityGroup(tlv1, sameAsTlv1) 34 + .addEqualityGroup(tlv1, sameAsTlv1)
35 - .addEqualityGroup(tlv2) 35 + .addEqualityGroup(tlv2)
36 - .testEquals(); 36 + .testEquals();
37 - } 37 + }
38 -} 38 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.AutonomousSystemTlv; 21 +import org.onosproject.pcepio.types.AutonomousSystemTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the AutonomousSystemTlv. 24 + * Test of the AutonomousSystemTlv.
25 - */ 25 + */
26 -public class AutonomousSystemTlvTest { 26 +public class AutonomousSystemTlvTest {
27 - private final AutonomousSystemTlv tlv1 = AutonomousSystemTlv.of(1); 27 + private final AutonomousSystemTlv tlv1 = AutonomousSystemTlv.of(1);
28 - private final AutonomousSystemTlv sameAsTlv1 = AutonomousSystemTlv.of(1); 28 + private final AutonomousSystemTlv sameAsTlv1 = AutonomousSystemTlv.of(1);
29 - private final AutonomousSystemTlv tlv2 = AutonomousSystemTlv.of(2); 29 + private final AutonomousSystemTlv tlv2 = AutonomousSystemTlv.of(2);
30 - 30 +
31 - @Test 31 + @Test
32 - public void basics() { 32 + public void basics() {
33 - new EqualsTester() 33 + new EqualsTester()
34 - .addEqualityGroup(tlv1, sameAsTlv1) 34 + .addEqualityGroup(tlv1, sameAsTlv1)
35 - .addEqualityGroup(tlv2) 35 + .addEqualityGroup(tlv2)
36 - .testEquals(); 36 + .testEquals();
37 - } 37 + }
38 -} 38 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.BGPLSidentifierTlv; 21 +import org.onosproject.pcepio.types.BGPLSidentifierTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the BGPLSidentifierTlv. 24 + * Test of the BGPLSidentifierTlv.
25 - */ 25 + */
26 -public class BGPLSidentifierTlvTest { 26 +public class BGPLSidentifierTlvTest {
27 - private final BGPLSidentifierTlv tlv1 = BGPLSidentifierTlv.of(1); 27 + private final BGPLSidentifierTlv tlv1 = BGPLSidentifierTlv.of(1);
28 - private final BGPLSidentifierTlv sameAsTlv1 = BGPLSidentifierTlv.of(1); 28 + private final BGPLSidentifierTlv sameAsTlv1 = BGPLSidentifierTlv.of(1);
29 - private final BGPLSidentifierTlv tlv2 = BGPLSidentifierTlv.of(2); 29 + private final BGPLSidentifierTlv tlv2 = BGPLSidentifierTlv.of(2);
30 - 30 +
31 - @Test 31 + @Test
32 - public void basics() { 32 + public void basics() {
33 - new EqualsTester() 33 + new EqualsTester()
34 - .addEqualityGroup(tlv1, sameAsTlv1) 34 + .addEqualityGroup(tlv1, sameAsTlv1)
35 - .addEqualityGroup(tlv2) 35 + .addEqualityGroup(tlv2)
36 - .testEquals(); 36 + .testEquals();
37 - } 37 + }
38 -} 38 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.GmplsCapabilityTlv; 21 +import org.onosproject.pcepio.types.GmplsCapabilityTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the GmplsCapabilityTlv. 24 + * Test of the GmplsCapabilityTlv.
25 - */ 25 + */
26 -public class GmplsCapabilityTlvTest { 26 +public class GmplsCapabilityTlvTest {
27 - private final GmplsCapabilityTlv tlv1 = GmplsCapabilityTlv.of(1); 27 + private final GmplsCapabilityTlv tlv1 = GmplsCapabilityTlv.of(1);
28 - private final GmplsCapabilityTlv sameAsTlv1 = GmplsCapabilityTlv.of(1); 28 + private final GmplsCapabilityTlv sameAsTlv1 = GmplsCapabilityTlv.of(1);
29 - private final GmplsCapabilityTlv tlv2 = GmplsCapabilityTlv.of(2); 29 + private final GmplsCapabilityTlv tlv2 = GmplsCapabilityTlv.of(2);
30 - 30 +
31 - @Test 31 + @Test
32 - public void basics() { 32 + public void basics() {
33 - new EqualsTester() 33 + new EqualsTester()
34 - .addEqualityGroup(tlv1, sameAsTlv1) 34 + .addEqualityGroup(tlv1, sameAsTlv1)
35 - .addEqualityGroup(tlv2) 35 + .addEqualityGroup(tlv2)
36 - .testEquals(); 36 + .testEquals();
37 - } 37 + }
38 -} 38 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IGPMetricTlv; 21 +import org.onosproject.pcepio.types.IGPMetricTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IGPMetricTlv. 24 + * Test of the IGPMetricTlv.
25 - */ 25 + */
26 -public class IGPMetricTlvTest { 26 +public class IGPMetricTlvTest {
27 - private final byte[] b1 = new byte[] {0x01, 0x02}; 27 + private final byte[] b1 = new byte[] {0x01, 0x02};
28 - private final byte[] b2 = new byte[] {0x01, 0x02}; 28 + private final byte[] b2 = new byte[] {0x01, 0x02};
29 - private final IGPMetricTlv tlv1 = IGPMetricTlv.of(b1, (short) 2); 29 + private final IGPMetricTlv tlv1 = IGPMetricTlv.of(b1, (short) 2);
30 - private final IGPMetricTlv sameAsTlv1 = IGPMetricTlv.of(b1, (short) 2); 30 + private final IGPMetricTlv sameAsTlv1 = IGPMetricTlv.of(b1, (short) 2);
31 - private final IGPMetricTlv tlv2 = IGPMetricTlv.of(b2, (short) 2); 31 + private final IGPMetricTlv tlv2 = IGPMetricTlv.of(b2, (short) 2);
32 - 32 +
33 - @Test 33 + @Test
34 - public void basics() { 34 + public void basics() {
35 - new EqualsTester() 35 + new EqualsTester()
36 - .addEqualityGroup(tlv1, sameAsTlv1) 36 + .addEqualityGroup(tlv1, sameAsTlv1)
37 - .addEqualityGroup(tlv2) 37 + .addEqualityGroup(tlv2)
38 - .testEquals(); 38 + .testEquals();
39 - } 39 + }
40 -} 40 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv; 21 +import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv4InterfaceAddressTlv. 24 + * Test of the IPv4InterfaceAddressTlv.
25 - */ 25 + */
26 -public class IPv4InterfaceAddressTlvTest { 26 +public class IPv4InterfaceAddressTlvTest {
27 - 27 +
28 - private final IPv4InterfaceAddressTlv tlv1 = IPv4InterfaceAddressTlv.of(2); 28 + private final IPv4InterfaceAddressTlv tlv1 = IPv4InterfaceAddressTlv.of(2);
29 - private final IPv4InterfaceAddressTlv sameAsTlv1 = IPv4InterfaceAddressTlv.of(2); 29 + private final IPv4InterfaceAddressTlv sameAsTlv1 = IPv4InterfaceAddressTlv.of(2);
30 - private final IPv4InterfaceAddressTlv tlv2 = IPv4InterfaceAddressTlv.of(3); 30 + private final IPv4InterfaceAddressTlv tlv2 = IPv4InterfaceAddressTlv.of(3);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(tlv1, sameAsTlv1) 35 + .addEqualityGroup(tlv1, sameAsTlv1)
36 - .addEqualityGroup(tlv2) 36 + .addEqualityGroup(tlv2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv4NeighborAddressTlv; 21 +import org.onosproject.pcepio.types.IPv4NeighborAddressTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv4NeighborAddressTlv. 24 + * Test of the IPv4NeighborAddressTlv.
25 - */ 25 + */
26 -public class IPv4NeighborAddressTlvTest { 26 +public class IPv4NeighborAddressTlvTest {
27 - 27 +
28 - private final IPv4NeighborAddressTlv tlv1 = IPv4NeighborAddressTlv.of(2); 28 + private final IPv4NeighborAddressTlv tlv1 = IPv4NeighborAddressTlv.of(2);
29 - private final IPv4NeighborAddressTlv sameAsTlv1 = IPv4NeighborAddressTlv.of(2); 29 + private final IPv4NeighborAddressTlv sameAsTlv1 = IPv4NeighborAddressTlv.of(2);
30 - private final IPv4NeighborAddressTlv tlv2 = IPv4NeighborAddressTlv.of(3); 30 + private final IPv4NeighborAddressTlv tlv2 = IPv4NeighborAddressTlv.of(3);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(tlv1, sameAsTlv1) 35 + .addEqualityGroup(tlv1, sameAsTlv1)
36 - .addEqualityGroup(tlv2) 36 + .addEqualityGroup(tlv2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv4SubObject; 21 +import org.onosproject.pcepio.types.IPv4SubObject;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv4SubObject. 24 + * Test of the IPv4SubObject.
25 - */ 25 + */
26 -public class IPv4SubObjectTest { 26 +public class IPv4SubObjectTest {
27 - 27 +
28 - private final IPv4SubObject subObj1 = IPv4SubObject.of(2, (byte) 16, (byte) 0); 28 + private final IPv4SubObject subObj1 = IPv4SubObject.of(2, (byte) 16, (byte) 0);
29 - private final IPv4SubObject sameAsSubObj1 = IPv4SubObject.of(2, (byte) 16, (byte) 0); 29 + private final IPv4SubObject sameAsSubObj1 = IPv4SubObject.of(2, (byte) 16, (byte) 0);
30 - private final IPv4SubObject subObj2 = IPv4SubObject.of(3, (byte) 16, (byte) 0); 30 + private final IPv4SubObject subObj2 = IPv4SubObject.of(3, (byte) 16, (byte) 0);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(subObj1, sameAsSubObj1) 35 + .addEqualityGroup(subObj1, sameAsSubObj1)
36 - .addEqualityGroup(subObj2) 36 + .addEqualityGroup(subObj2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv4TERouterIdOfLocalNodeTlv; 21 +import org.onosproject.pcepio.types.IPv4TERouterIdOfLocalNodeTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv4TERouterIdOfLocalNodeTlv. 24 + * Test of the IPv4TERouterIdOfLocalNodeTlv.
25 - */ 25 + */
26 -public class IPv4TERouterIdOfLocalNodeTlvTest { 26 +public class IPv4TERouterIdOfLocalNodeTlvTest {
27 - 27 +
28 - private final IPv4TERouterIdOfLocalNodeTlv tlv1 = IPv4TERouterIdOfLocalNodeTlv.of(2); 28 + private final IPv4TERouterIdOfLocalNodeTlv tlv1 = IPv4TERouterIdOfLocalNodeTlv.of(2);
29 - private final IPv4TERouterIdOfLocalNodeTlv sameAsTlv1 = IPv4TERouterIdOfLocalNodeTlv.of(2); 29 + private final IPv4TERouterIdOfLocalNodeTlv sameAsTlv1 = IPv4TERouterIdOfLocalNodeTlv.of(2);
30 - private final IPv4TERouterIdOfLocalNodeTlv tlv2 = IPv4TERouterIdOfLocalNodeTlv.of(3); 30 + private final IPv4TERouterIdOfLocalNodeTlv tlv2 = IPv4TERouterIdOfLocalNodeTlv.of(3);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(tlv1, sameAsTlv1) 35 + .addEqualityGroup(tlv1, sameAsTlv1)
36 - .addEqualityGroup(tlv2) 36 + .addEqualityGroup(tlv2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv4TERouterIdOfRemoteNodeTlv; 21 +import org.onosproject.pcepio.types.IPv4TERouterIdOfRemoteNodeTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv4TERouterIdOfRemoteNodeTlv. 24 + * Test of the IPv4TERouterIdOfRemoteNodeTlv.
25 - */ 25 + */
26 -public class IPv4TERouterIdOfRemoteNodeTlvTest { 26 +public class IPv4TERouterIdOfRemoteNodeTlvTest {
27 - 27 +
28 - private final IPv4TERouterIdOfRemoteNodeTlv tlv1 = IPv4TERouterIdOfRemoteNodeTlv.of(2); 28 + private final IPv4TERouterIdOfRemoteNodeTlv tlv1 = IPv4TERouterIdOfRemoteNodeTlv.of(2);
29 - private final IPv4TERouterIdOfRemoteNodeTlv sameAsTlv1 = IPv4TERouterIdOfRemoteNodeTlv.of(2); 29 + private final IPv4TERouterIdOfRemoteNodeTlv sameAsTlv1 = IPv4TERouterIdOfRemoteNodeTlv.of(2);
30 - private final IPv4TERouterIdOfRemoteNodeTlv tlv2 = IPv4TERouterIdOfRemoteNodeTlv.of(3); 30 + private final IPv4TERouterIdOfRemoteNodeTlv tlv2 = IPv4TERouterIdOfRemoteNodeTlv.of(3);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(tlv1, sameAsTlv1) 35 + .addEqualityGroup(tlv1, sameAsTlv1)
36 - .addEqualityGroup(tlv2) 36 + .addEqualityGroup(tlv2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv6InterfaceAddressTlv; 21 +import org.onosproject.pcepio.types.IPv6InterfaceAddressTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv6InterfaceAddressTlv. 24 + * Test of the IPv6InterfaceAddressTlv.
25 - */ 25 + */
26 -public class IPv6InterfaceAddressTlvTest { 26 +public class IPv6InterfaceAddressTlvTest {
27 - 27 +
28 - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 28 + private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
29 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; 29 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00};
30 - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 30 + private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
31 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; 31 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 };
32 - 32 +
33 - private final IPv6InterfaceAddressTlv tlv1 = IPv6InterfaceAddressTlv.of(b1); 33 + private final IPv6InterfaceAddressTlv tlv1 = IPv6InterfaceAddressTlv.of(b1);
34 - private final IPv6InterfaceAddressTlv sameAsTlv1 = IPv6InterfaceAddressTlv.of(b1); 34 + private final IPv6InterfaceAddressTlv sameAsTlv1 = IPv6InterfaceAddressTlv.of(b1);
35 - private final IPv6InterfaceAddressTlv tlv2 = IPv6InterfaceAddressTlv.of(b2); 35 + private final IPv6InterfaceAddressTlv tlv2 = IPv6InterfaceAddressTlv.of(b2);
36 - 36 +
37 - @Test 37 + @Test
38 - public void basics() { 38 + public void basics() {
39 - new EqualsTester() 39 + new EqualsTester()
40 - .addEqualityGroup(tlv1, sameAsTlv1) 40 + .addEqualityGroup(tlv1, sameAsTlv1)
41 - .addEqualityGroup(tlv2) 41 + .addEqualityGroup(tlv2)
42 - .testEquals(); 42 + .testEquals();
43 - } 43 + }
44 -} 44 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv6NeighborAddressTlv; 21 +import org.onosproject.pcepio.types.IPv6NeighborAddressTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv6NeighborAddressTlv. 24 + * Test of the IPv6NeighborAddressTlv.
25 - */ 25 + */
26 -public class IPv6NeighborAddressTlvTest { 26 +public class IPv6NeighborAddressTlvTest {
27 - 27 +
28 - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 28 + private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
29 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; 29 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00};
30 - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 30 + private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
31 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; 31 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 };
32 - 32 +
33 - private final IPv6NeighborAddressTlv tlv1 = IPv6NeighborAddressTlv.of(b1); 33 + private final IPv6NeighborAddressTlv tlv1 = IPv6NeighborAddressTlv.of(b1);
34 - private final IPv6NeighborAddressTlv sameAsTlv1 = IPv6NeighborAddressTlv.of(b1); 34 + private final IPv6NeighborAddressTlv sameAsTlv1 = IPv6NeighborAddressTlv.of(b1);
35 - private final IPv6NeighborAddressTlv tlv2 = IPv6NeighborAddressTlv.of(b2); 35 + private final IPv6NeighborAddressTlv tlv2 = IPv6NeighborAddressTlv.of(b2);
36 - 36 +
37 - @Test 37 + @Test
38 - public void basics() { 38 + public void basics() {
39 - new EqualsTester() 39 + new EqualsTester()
40 - .addEqualityGroup(tlv1, sameAsTlv1) 40 + .addEqualityGroup(tlv1, sameAsTlv1)
41 - .addEqualityGroup(tlv2) 41 + .addEqualityGroup(tlv2)
42 - .testEquals(); 42 + .testEquals();
43 - } 43 + }
44 -} 44 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv6SubObject; 21 +import org.onosproject.pcepio.types.IPv6SubObject;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv6SubObject. 24 + * Test of the IPv6SubObject.
25 - */ 25 + */
26 -public class IPv6SubObjectTest { 26 +public class IPv6SubObjectTest {
27 - 27 +
28 - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 28 + private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
29 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; 29 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00};
30 - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 30 + private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
31 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; 31 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 };
32 - 32 +
33 - private final IPv6SubObject subObj1 = IPv6SubObject.of(b1); 33 + private final IPv6SubObject subObj1 = IPv6SubObject.of(b1);
34 - private final IPv6SubObject sameAsSubObj1 = IPv6SubObject.of(b1); 34 + private final IPv6SubObject sameAsSubObj1 = IPv6SubObject.of(b1);
35 - private final IPv6SubObject subObj2 = IPv6SubObject.of(b2); 35 + private final IPv6SubObject subObj2 = IPv6SubObject.of(b2);
36 - 36 +
37 - @Test 37 + @Test
38 - public void basics() { 38 + public void basics() {
39 - new EqualsTester().addEqualityGroup(subObj1, sameAsSubObj1).addEqualityGroup(subObj2).testEquals(); 39 + new EqualsTester().addEqualityGroup(subObj1, sameAsSubObj1).addEqualityGroup(subObj2).testEquals();
40 - } 40 + }
41 -} 41 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv6TERouterIdofLocalNodeTlv; 21 +import org.onosproject.pcepio.types.IPv6TERouterIdofLocalNodeTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv6TERouterIdofLocalNodeTlv. 24 + * Test of the IPv6TERouterIdofLocalNodeTlv.
25 - */ 25 + */
26 -public class IPv6TERouterIdofLocalNodeTlvTest { 26 +public class IPv6TERouterIdofLocalNodeTlvTest {
27 - 27 +
28 - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 28 + private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
29 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; 29 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00};
30 - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 30 + private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
31 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; 31 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 };
32 - 32 +
33 - private final IPv6TERouterIdofLocalNodeTlv tlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1); 33 + private final IPv6TERouterIdofLocalNodeTlv tlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1);
34 - private final IPv6TERouterIdofLocalNodeTlv sameAsTlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1); 34 + private final IPv6TERouterIdofLocalNodeTlv sameAsTlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1);
35 - private final IPv6TERouterIdofLocalNodeTlv tlv2 = IPv6TERouterIdofLocalNodeTlv.of(b2); 35 + private final IPv6TERouterIdofLocalNodeTlv tlv2 = IPv6TERouterIdofLocalNodeTlv.of(b2);
36 - 36 +
37 - @Test 37 + @Test
38 - public void basics() { 38 + public void basics() {
39 - new EqualsTester() 39 + new EqualsTester()
40 - .addEqualityGroup(tlv1, sameAsTlv1) 40 + .addEqualityGroup(tlv1, sameAsTlv1)
41 - .addEqualityGroup(tlv2) 41 + .addEqualityGroup(tlv2)
42 - .testEquals(); 42 + .testEquals();
43 - } 43 + }
44 -} 44 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv6TERouterIdofRemoteNodeTlv; 21 +import org.onosproject.pcepio.types.IPv6TERouterIdofRemoteNodeTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the IPv6TERouterIdofRemoteNodeTlv. 24 + * Test of the IPv6TERouterIdofRemoteNodeTlv.
25 - */ 25 + */
26 -public class IPv6TERouterIdofRemoteNodeTlvTest { 26 +public class IPv6TERouterIdofRemoteNodeTlvTest {
27 - 27 +
28 - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 28 + private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
29 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; 29 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00};
30 - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 30 + private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
31 - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; 31 + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 };
32 - 32 +
33 - private final IPv6TERouterIdofRemoteNodeTlv tlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1); 33 + private final IPv6TERouterIdofRemoteNodeTlv tlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1);
34 - private final IPv6TERouterIdofRemoteNodeTlv sameAsTlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1); 34 + private final IPv6TERouterIdofRemoteNodeTlv sameAsTlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1);
35 - private final IPv6TERouterIdofRemoteNodeTlv tlv2 = IPv6TERouterIdofRemoteNodeTlv.of(b2); 35 + private final IPv6TERouterIdofRemoteNodeTlv tlv2 = IPv6TERouterIdofRemoteNodeTlv.of(b2);
36 - 36 +
37 - @Test 37 + @Test
38 - public void basics() { 38 + public void basics() {
39 - new EqualsTester() 39 + new EqualsTester()
40 - .addEqualityGroup(tlv1, sameAsTlv1) 40 + .addEqualityGroup(tlv1, sameAsTlv1)
41 - .addEqualityGroup(tlv2) 41 + .addEqualityGroup(tlv2)
42 - .testEquals(); 42 + .testEquals();
43 - } 43 + }
44 -} 44 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.ISISAreaIdentifierTlv; 21 +import org.onosproject.pcepio.types.ISISAreaIdentifierTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the ISISAreaIdentifierTlv. 24 + * Test of the ISISAreaIdentifierTlv.
25 - */ 25 + */
26 -public class ISISAreaIdentifierTlvTest { 26 +public class ISISAreaIdentifierTlvTest {
27 - 27 +
28 - private final byte[] b1 = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; 28 + private final byte[] b1 = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
29 - private final byte[] b2 = new byte[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; 29 + private final byte[] b2 = new byte[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
30 - 30 +
31 - private final ISISAreaIdentifierTlv tlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20); 31 + private final ISISAreaIdentifierTlv tlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20);
32 - private final ISISAreaIdentifierTlv sameAsTlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20); 32 + private final ISISAreaIdentifierTlv sameAsTlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20);
33 - private final ISISAreaIdentifierTlv tlv2 = ISISAreaIdentifierTlv.of(b2, (short) 20); 33 + private final ISISAreaIdentifierTlv tlv2 = ISISAreaIdentifierTlv.of(b2, (short) 20);
34 - 34 +
35 - @Test 35 + @Test
36 - public void basics() { 36 + public void basics() {
37 - new EqualsTester() 37 + new EqualsTester()
38 - .addEqualityGroup(tlv1, sameAsTlv1) 38 + .addEqualityGroup(tlv1, sameAsTlv1)
39 - .addEqualityGroup(tlv2) 39 + .addEqualityGroup(tlv2)
40 - .testEquals(); 40 + .testEquals();
41 - } 41 + }
42 -} 42 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.LabelSubObject; 21 +import org.onosproject.pcepio.types.LabelSubObject;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the LabelSubObject. 24 + * Test of the LabelSubObject.
25 - */ 25 + */
26 -public class LabelSubObjectTest { 26 +public class LabelSubObjectTest {
27 - 27 +
28 - private final LabelSubObject subObj1 = LabelSubObject.of((byte) 0, (byte) 1, 20); 28 + private final LabelSubObject subObj1 = LabelSubObject.of((byte) 0, (byte) 1, 20);
29 - private final LabelSubObject sameAsSubObj1 = LabelSubObject.of((byte) 0, (byte) 1, 20); 29 + private final LabelSubObject sameAsSubObj1 = LabelSubObject.of((byte) 0, (byte) 1, 20);
30 - private final LabelSubObject subObj2 = LabelSubObject.of((byte) 0, (byte) 1, 30); 30 + private final LabelSubObject subObj2 = LabelSubObject.of((byte) 0, (byte) 1, 30);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(subObj1, sameAsSubObj1) 35 + .addEqualityGroup(subObj1, sameAsSubObj1)
36 - .addEqualityGroup(subObj2) 36 + .addEqualityGroup(subObj2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv; 21 +import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the LinkLocalRemoteIdentifiersTlv. 24 + * Test of the LinkLocalRemoteIdentifiersTlv.
25 - */ 25 + */
26 -public class LinkLocalRemoteIdentifiersTlvTest { 26 +public class LinkLocalRemoteIdentifiersTlvTest {
27 - 27 +
28 - private final LinkLocalRemoteIdentifiersTlv tlv1 = LinkLocalRemoteIdentifiersTlv.of(10, 20); 28 + private final LinkLocalRemoteIdentifiersTlv tlv1 = LinkLocalRemoteIdentifiersTlv.of(10, 20);
29 - private final LinkLocalRemoteIdentifiersTlv sameAsTlv1 = LinkLocalRemoteIdentifiersTlv.of(10, 20); 29 + private final LinkLocalRemoteIdentifiersTlv sameAsTlv1 = LinkLocalRemoteIdentifiersTlv.of(10, 20);
30 - private final LinkLocalRemoteIdentifiersTlv tlv2 = LinkLocalRemoteIdentifiersTlv.of(20, 30); 30 + private final LinkLocalRemoteIdentifiersTlv tlv2 = LinkLocalRemoteIdentifiersTlv.of(20, 30);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(tlv1, sameAsTlv1) 35 + .addEqualityGroup(tlv1, sameAsTlv1)
36 - .addEqualityGroup(tlv2) 36 + .addEqualityGroup(tlv2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.LinkNameTlv; 19 +import org.onosproject.pcepio.types.LinkNameTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Equality test for LinkNameTlv. 24 + * Equality test for LinkNameTlv.
25 - */ 25 + */
26 -public class LinkNameTlvTest { 26 +public class LinkNameTlvTest {
27 - private final byte[] rawValue1 = new byte[] {0x01, 0x00}; 27 + private final byte[] rawValue1 = new byte[] {0x01, 0x00};
28 - private final byte[] rawValue2 = new byte[] {0x02, 0x00}; 28 + private final byte[] rawValue2 = new byte[] {0x02, 0x00};
29 - 29 +
30 - private final LinkNameTlv tlv1 = new LinkNameTlv(rawValue1, (short) rawValue1.length); 30 + private final LinkNameTlv tlv1 = new LinkNameTlv(rawValue1, (short) rawValue1.length);
31 - private final LinkNameTlv sameAsTlv1 = LinkNameTlv.of(tlv1.getValue(), tlv1.getLength()); 31 + private final LinkNameTlv sameAsTlv1 = LinkNameTlv.of(tlv1.getValue(), tlv1.getLength());
32 - private final LinkNameTlv tlv2 = new LinkNameTlv(rawValue2, (short) 0); 32 + private final LinkNameTlv tlv2 = new LinkNameTlv(rawValue2, (short) 0);
33 - 33 +
34 - @Test 34 + @Test
35 - public void basics() { 35 + public void basics() {
36 - new EqualsTester() 36 + new EqualsTester()
37 - .addEqualityGroup(tlv1, sameAsTlv1) 37 + .addEqualityGroup(tlv1, sameAsTlv1)
38 - .addEqualityGroup(tlv2) 38 + .addEqualityGroup(tlv2)
39 - .testEquals(); 39 + .testEquals();
40 - } 40 + }
41 -} 41 +}
......
1 -/* * Copyright 2015 Open Networking Laboratory * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.onosproject.pcepio; import org.junit.Test;import org.onosproject.pcepio.types.LinkProtectionTypeTlv; import com.google.common.testing.EqualsTester; /** * Test of the LinkProtectionTypeTlv. */public class LinkProtectionTypeTlvTest { private final byte rawValue1 = 0x0A; private final byte rawValue2 = 0x0B; private final LinkProtectionTypeTlv tlv1 = new LinkProtectionTypeTlv(rawValue1); private final LinkProtectionTypeTlv sameAsTlv1 = new LinkProtectionTypeTlv(rawValue1); private final LinkProtectionTypeTlv tlv2 = new LinkProtectionTypeTlv(rawValue2, (byte) 0); @Test public void basics() { new EqualsTester() .addEqualityGroup(tlv1, sameAsTlv1) .addEqualityGroup(tlv2) .testEquals(); }}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.pcepio;
17 +
18 +import org.junit.Test;
19 +import org.onosproject.pcepio.types.LinkProtectionTypeTlv;
20 +
21 +import com.google.common.testing.EqualsTester;
22 +
23 +/**
24 + * Test of the LinkProtectionTypeTlv.
25 + */
26 +public class LinkProtectionTypeTlvTest {
27 + private final byte rawValue1 = 0x0A;
28 + private final byte rawValue2 = 0x0B;
29 +
30 + private final LinkProtectionTypeTlv tlv1 = new LinkProtectionTypeTlv(rawValue1);
31 + private final LinkProtectionTypeTlv sameAsTlv1 = new LinkProtectionTypeTlv(rawValue1);
32 + private final LinkProtectionTypeTlv tlv2 = new LinkProtectionTypeTlv(rawValue2, (byte) 0);
33 +
34 + @Test
35 + public void basics() {
36 + new EqualsTester()
37 + .addEqualityGroup(tlv1, sameAsTlv1)
38 + .addEqualityGroup(tlv2)
39 + .testEquals();
40 + }
41 +}
......
1 -/* * Copyright 2015 Open Networking Laboratory * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.onosproject.pcepio; import com.google.common.testing.EqualsTester; import org.junit.Test; import java.util.LinkedList; import org.onosproject.pcepio.types.LocalTENodeDescriptorsTlv;import org.onosproject.pcepio.types.AutonomousSystemTlv;import org.onosproject.pcepio.types.BGPLSidentifierTlv;import org.onosproject.pcepio.types.PcepValueType; /** * Test of the LocalTENodeDescriptorsTlv. */public class LocalTENodeDescriptorsTlvTest { private final AutonomousSystemTlv baAutoSysTlvRawValue1 = new AutonomousSystemTlv(1); private final BGPLSidentifierTlv baBgplsIdRawValue1 = new BGPLSidentifierTlv(1); private final AutonomousSystemTlv baAutoSysTlvRawValue2 = new AutonomousSystemTlv(2); private final BGPLSidentifierTlv baBgplsIdRawValue2 = new BGPLSidentifierTlv(2); private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs1 = new LinkedList<PcepValueType>(); private final boolean a = llNodeDescriptorSubTLVs1.add(baAutoSysTlvRawValue1); private final boolean b = llNodeDescriptorSubTLVs1.add(baBgplsIdRawValue1); private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs2 = new LinkedList<PcepValueType>(); private final boolean c = llNodeDescriptorSubTLVs2.add(baAutoSysTlvRawValue2); private final boolean d = llNodeDescriptorSubTLVs2.add(baBgplsIdRawValue2); private final LocalTENodeDescriptorsTlv tlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1); private final LocalTENodeDescriptorsTlv sameAstlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1); private final LocalTENodeDescriptorsTlv tlv2 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs2); @Test public void basics() { new EqualsTester().addEqualityGroup(tlv1, sameAstlv1).addEqualityGroup(tlv2).testEquals(); }}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.pcepio;
17 +
18 +import com.google.common.testing.EqualsTester;
19 +
20 +import org.junit.Test;
21 +
22 +import java.util.LinkedList;
23 +
24 +import org.onosproject.pcepio.types.LocalTENodeDescriptorsTlv;
25 +import org.onosproject.pcepio.types.AutonomousSystemTlv;
26 +import org.onosproject.pcepio.types.BGPLSidentifierTlv;
27 +import org.onosproject.pcepio.types.PcepValueType;
28 +
29 +/**
30 + * Test of the LocalTENodeDescriptorsTlv.
31 + */
32 +public class LocalTENodeDescriptorsTlvTest {
33 +
34 + private final AutonomousSystemTlv baAutoSysTlvRawValue1 = new AutonomousSystemTlv(1);
35 + private final BGPLSidentifierTlv baBgplsIdRawValue1 = new BGPLSidentifierTlv(1);
36 +
37 + private final AutonomousSystemTlv baAutoSysTlvRawValue2 = new AutonomousSystemTlv(2);
38 + private final BGPLSidentifierTlv baBgplsIdRawValue2 = new BGPLSidentifierTlv(2);
39 +
40 + private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs1 = new LinkedList<PcepValueType>();
41 + private final boolean a = llNodeDescriptorSubTLVs1.add(baAutoSysTlvRawValue1);
42 + private final boolean b = llNodeDescriptorSubTLVs1.add(baBgplsIdRawValue1);
43 +
44 + private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs2 = new LinkedList<PcepValueType>();
45 + private final boolean c = llNodeDescriptorSubTLVs2.add(baAutoSysTlvRawValue2);
46 + private final boolean d = llNodeDescriptorSubTLVs2.add(baBgplsIdRawValue2);
47 +
48 + private final LocalTENodeDescriptorsTlv tlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1);
49 + private final LocalTENodeDescriptorsTlv sameAstlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1);
50 + private final LocalTENodeDescriptorsTlv tlv2 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs2);
51 +
52 + @Test
53 + public void basics() {
54 + new EqualsTester().addEqualityGroup(tlv1, sameAstlv1).addEqualityGroup(tlv2).testEquals();
55 + }
56 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.MPLSProtocolMaskTlv; 19 +import org.onosproject.pcepio.types.MPLSProtocolMaskTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the MPLSProtocolMaskTlv. 24 + * Test of the MPLSProtocolMaskTlv.
25 - */ 25 + */
26 -public class MPLSProtocolMaskTlvTest { 26 +public class MPLSProtocolMaskTlvTest {
27 - private final byte rawValue1 = 0x0A; 27 + private final byte rawValue1 = 0x0A;
28 - private final byte rawValue2 = 0x0B; 28 + private final byte rawValue2 = 0x0B;
29 - 29 +
30 - private final MPLSProtocolMaskTlv tlv1 = new MPLSProtocolMaskTlv(rawValue1); 30 + private final MPLSProtocolMaskTlv tlv1 = new MPLSProtocolMaskTlv(rawValue1);
31 - private final MPLSProtocolMaskTlv sameAsTlv1 = new MPLSProtocolMaskTlv(rawValue1); 31 + private final MPLSProtocolMaskTlv sameAsTlv1 = new MPLSProtocolMaskTlv(rawValue1);
32 - private final MPLSProtocolMaskTlv tlv2 = MPLSProtocolMaskTlv.of(rawValue2); 32 + private final MPLSProtocolMaskTlv tlv2 = MPLSProtocolMaskTlv.of(rawValue2);
33 - 33 +
34 - @Test 34 + @Test
35 - public void basics() { 35 + public void basics() {
36 - new EqualsTester() 36 + new EqualsTester()
37 - .addEqualityGroup(tlv1, sameAsTlv1) 37 + .addEqualityGroup(tlv1, sameAsTlv1)
38 - .addEqualityGroup(tlv2) 38 + .addEqualityGroup(tlv2)
39 - .testEquals(); 39 + .testEquals();
40 - } 40 + }
41 -} 41 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.MaximumLinkBandwidthTlv; 19 +import org.onosproject.pcepio.types.MaximumLinkBandwidthTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the MaximumLinkBandwidthTlv. 24 + * Test of the MaximumLinkBandwidthTlv.
25 - */ 25 + */
26 -public class MaximumLinkBandwidthTlvTest { 26 +public class MaximumLinkBandwidthTlvTest {
27 - private final int rawValue1 = 0x0A; 27 + private final int rawValue1 = 0x0A;
28 - private final int rawValue2 = 0x0B; 28 + private final int rawValue2 = 0x0B;
29 - 29 +
30 - private final MaximumLinkBandwidthTlv tlv1 = new MaximumLinkBandwidthTlv(rawValue1); 30 + private final MaximumLinkBandwidthTlv tlv1 = new MaximumLinkBandwidthTlv(rawValue1);
31 - private final MaximumLinkBandwidthTlv sameAsTlv1 = new MaximumLinkBandwidthTlv(rawValue1); 31 + private final MaximumLinkBandwidthTlv sameAsTlv1 = new MaximumLinkBandwidthTlv(rawValue1);
32 - private final MaximumLinkBandwidthTlv tlv2 = MaximumLinkBandwidthTlv.of(rawValue2); 32 + private final MaximumLinkBandwidthTlv tlv2 = MaximumLinkBandwidthTlv.of(rawValue2);
33 - 33 +
34 - @Test 34 + @Test
35 - public void basics() { 35 + public void basics() {
36 - new EqualsTester() 36 + new EqualsTester()
37 - .addEqualityGroup(tlv1, sameAsTlv1) 37 + .addEqualityGroup(tlv1, sameAsTlv1)
38 - .addEqualityGroup(tlv2) 38 + .addEqualityGroup(tlv2)
39 - .testEquals(); 39 + .testEquals();
40 - } 40 + }
41 -} 41 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.MaximumReservableLinkBandwidthTlv; 19 +import org.onosproject.pcepio.types.MaximumReservableLinkBandwidthTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the MaximumReservableLinkBandwidthTlv. 24 + * Test of the MaximumReservableLinkBandwidthTlv.
25 - */ 25 + */
26 -public class MaximumReservableLinkBandwidthTlvTest { 26 +public class MaximumReservableLinkBandwidthTlvTest {
27 - private final int rawValue1 = 0x0A; 27 + private final int rawValue1 = 0x0A;
28 - private final int rawValue2 = 0x0B; 28 + private final int rawValue2 = 0x0B;
29 - 29 +
30 - private final MaximumReservableLinkBandwidthTlv tlv1 = new MaximumReservableLinkBandwidthTlv(rawValue1); 30 + private final MaximumReservableLinkBandwidthTlv tlv1 = new MaximumReservableLinkBandwidthTlv(rawValue1);
31 - private final MaximumReservableLinkBandwidthTlv sameAsTlv1 = new MaximumReservableLinkBandwidthTlv(rawValue1); 31 + private final MaximumReservableLinkBandwidthTlv sameAsTlv1 = new MaximumReservableLinkBandwidthTlv(rawValue1);
32 - private final MaximumReservableLinkBandwidthTlv tlv2 = MaximumReservableLinkBandwidthTlv.of(rawValue2); 32 + private final MaximumReservableLinkBandwidthTlv tlv2 = MaximumReservableLinkBandwidthTlv.of(rawValue2);
33 - 33 +
34 - @Test 34 + @Test
35 - public void basics() { 35 + public void basics() {
36 - new EqualsTester() 36 + new EqualsTester()
37 - .addEqualityGroup(tlv1, sameAsTlv1) 37 + .addEqualityGroup(tlv1, sameAsTlv1)
38 - .addEqualityGroup(tlv2) 38 + .addEqualityGroup(tlv2)
39 - .testEquals(); 39 + .testEquals();
40 - } 40 + }
41 -} 41 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.NexthopIPv4addressTlv; 19 +import org.onosproject.pcepio.types.NexthopIPv4addressTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Equality test for NexthopIPv4addressTlv. 24 + * Equality test for NexthopIPv4addressTlv.
25 - */ 25 + */
26 -public class NexthopIPv4addressTlvTest { 26 +public class NexthopIPv4addressTlvTest {
27 - 27 +
28 - private final NexthopIPv4addressTlv tlv1 = new NexthopIPv4addressTlv(0x0A); 28 + private final NexthopIPv4addressTlv tlv1 = new NexthopIPv4addressTlv(0x0A);
29 - private final NexthopIPv4addressTlv sameAsTlv1 = new NexthopIPv4addressTlv(0x0A); 29 + private final NexthopIPv4addressTlv sameAsTlv1 = new NexthopIPv4addressTlv(0x0A);
30 - private final NexthopIPv4addressTlv tlv2 = NexthopIPv4addressTlv.of(0x0B); 30 + private final NexthopIPv4addressTlv tlv2 = NexthopIPv4addressTlv.of(0x0B);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(tlv1, sameAsTlv1) 35 + .addEqualityGroup(tlv1, sameAsTlv1)
36 - .addEqualityGroup(tlv2) 36 + .addEqualityGroup(tlv2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.NexthopUnnumberedIPv4IDTlv; 19 +import org.onosproject.pcepio.types.NexthopUnnumberedIPv4IDTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Equality test for NexthopUnnumberedIPv4IDTlv. 24 + * Equality test for NexthopUnnumberedIPv4IDTlv.
25 - */ 25 + */
26 -public class NexthopUnnumberedIPv4IDTlvTest { 26 +public class NexthopUnnumberedIPv4IDTlvTest {
27 - 27 +
28 - private final NexthopUnnumberedIPv4IDTlv tlv1 = new NexthopUnnumberedIPv4IDTlv(0x0A, 0x0A); 28 + private final NexthopUnnumberedIPv4IDTlv tlv1 = new NexthopUnnumberedIPv4IDTlv(0x0A, 0x0A);
29 - private final NexthopUnnumberedIPv4IDTlv sameAsTlv1 = new NexthopUnnumberedIPv4IDTlv(0x0A, 0x0A); 29 + private final NexthopUnnumberedIPv4IDTlv sameAsTlv1 = new NexthopUnnumberedIPv4IDTlv(0x0A, 0x0A);
30 - private final NexthopUnnumberedIPv4IDTlv tlv2 = NexthopUnnumberedIPv4IDTlv.of(0x0B, 0x0B); 30 + private final NexthopUnnumberedIPv4IDTlv tlv2 = NexthopUnnumberedIPv4IDTlv.of(0x0B, 0x0B);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(tlv1, sameAsTlv1) 35 + .addEqualityGroup(tlv1, sameAsTlv1)
36 - .addEqualityGroup(tlv2) 36 + .addEqualityGroup(tlv2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.NodeFlagBitsTlv; 19 +import org.onosproject.pcepio.types.NodeFlagBitsTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the NodeFlagBitsTlv. 24 + * Test of the NodeFlagBitsTlv.
25 - */ 25 + */
26 -public class NodeFlagBitsTlvTest { 26 +public class NodeFlagBitsTlvTest {
27 - private final byte rawValue1 = 0x0A; 27 + private final byte rawValue1 = 0x0A;
28 - private final byte rawValue2 = 0x0B; 28 + private final byte rawValue2 = 0x0B;
29 - 29 +
30 - private final NodeFlagBitsTlv tlv1 = new NodeFlagBitsTlv(rawValue1); 30 + private final NodeFlagBitsTlv tlv1 = new NodeFlagBitsTlv(rawValue1);
31 - private final NodeFlagBitsTlv sameAsTlv1 = new NodeFlagBitsTlv(rawValue1); 31 + private final NodeFlagBitsTlv sameAsTlv1 = new NodeFlagBitsTlv(rawValue1);
32 - private final NodeFlagBitsTlv tlv2 = NodeFlagBitsTlv.of(rawValue2); 32 + private final NodeFlagBitsTlv tlv2 = NodeFlagBitsTlv.of(rawValue2);
33 - 33 +
34 - @Test 34 + @Test
35 - public void basics() { 35 + public void basics() {
36 - new EqualsTester() 36 + new EqualsTester()
37 - .addEqualityGroup(tlv1, sameAsTlv1) 37 + .addEqualityGroup(tlv1, sameAsTlv1)
38 - .addEqualityGroup(tlv2) 38 + .addEqualityGroup(tlv2)
39 - .testEquals(); 39 + .testEquals();
40 - } 40 + }
41 -} 41 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.NodeNameTlv; 19 +import org.onosproject.pcepio.types.NodeNameTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the NodeNameTlv. 24 + * Test of the NodeNameTlv.
25 - */ 25 + */
26 -public class NodeNameTlvTest { 26 +public class NodeNameTlvTest {
27 - private final byte[] rawValue1 = new byte[] {0x01, 0x02}; 27 + private final byte[] rawValue1 = new byte[] {0x01, 0x02};
28 - private final byte[] rawValue2 = new byte[] {0x14, 0x15}; 28 + private final byte[] rawValue2 = new byte[] {0x14, 0x15};
29 - 29 +
30 - private final NodeNameTlv tlv1 = new NodeNameTlv(rawValue1, (short) rawValue1.length); 30 + private final NodeNameTlv tlv1 = new NodeNameTlv(rawValue1, (short) rawValue1.length);
31 - private final NodeNameTlv sameAsTlv1 = NodeNameTlv.of(tlv1.getValue(), tlv1.getLength()); 31 + private final NodeNameTlv sameAsTlv1 = NodeNameTlv.of(tlv1.getValue(), tlv1.getLength());
32 - private final NodeNameTlv tlv2 = new NodeNameTlv(rawValue2, (short) 0); 32 + private final NodeNameTlv tlv2 = new NodeNameTlv(rawValue2, (short) 0);
33 - 33 +
34 - @Test 34 + @Test
35 - public void basics() { 35 + public void basics() {
36 - new EqualsTester() 36 + new EqualsTester()
37 - .addEqualityGroup(tlv1, sameAsTlv1) 37 + .addEqualityGroup(tlv1, sameAsTlv1)
38 - .addEqualityGroup(tlv2) 38 + .addEqualityGroup(tlv2)
39 - .testEquals(); 39 + .testEquals();
40 - } 40 + }
41 -} 41 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import com.google.common.testing.EqualsTester; 18 +import com.google.common.testing.EqualsTester;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.OSPFareaIDsubTlv; 21 +import org.onosproject.pcepio.types.OSPFareaIDsubTlv;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the OSPFareaIDsubTlv. 24 + * Test of the OSPFareaIDsubTlv.
25 - */ 25 + */
26 -public class OSPFareaIDsubTlvTest { 26 +public class OSPFareaIDsubTlvTest {
27 - private final int rawValue1 = 0x0A; 27 + private final int rawValue1 = 0x0A;
28 - 28 +
29 - private final OSPFareaIDsubTlv tlv1 = new OSPFareaIDsubTlv(rawValue1); 29 + private final OSPFareaIDsubTlv tlv1 = new OSPFareaIDsubTlv(rawValue1);
30 - private final OSPFareaIDsubTlv tlv2 = OSPFareaIDsubTlv.of(tlv1.getInt()); 30 + private final OSPFareaIDsubTlv tlv2 = OSPFareaIDsubTlv.of(tlv1.getInt());
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(tlv1, tlv2) 35 + .addEqualityGroup(tlv1, tlv2)
36 - .testEquals(); 36 + .testEquals();
37 - } 37 + }
38 -} 38 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.OpaqueLinkAttributeTlv; 19 +import org.onosproject.pcepio.types.OpaqueLinkAttributeTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the OpaqueLinkAttributeTlv. 24 + * Test of the OpaqueLinkAttributeTlv.
25 - */ 25 + */
26 -public class OpaqueLinkAttributeTlvTest { 26 +public class OpaqueLinkAttributeTlvTest {
27 - private final byte[] rawValue1 = new byte[] {0x01, 0x02}; 27 + private final byte[] rawValue1 = new byte[] {0x01, 0x02};
28 - private final byte[] rawValue2 = new byte[] {0x14, 0x15}; 28 + private final byte[] rawValue2 = new byte[] {0x14, 0x15};
29 - 29 +
30 - private final OpaqueLinkAttributeTlv tlv1 = new OpaqueLinkAttributeTlv(rawValue1, (short) rawValue1.length); 30 + private final OpaqueLinkAttributeTlv tlv1 = new OpaqueLinkAttributeTlv(rawValue1, (short) rawValue1.length);
31 - private final OpaqueLinkAttributeTlv sameAsTlv1 = OpaqueLinkAttributeTlv.of(tlv1.getValue(), tlv1.getLength()); 31 + private final OpaqueLinkAttributeTlv sameAsTlv1 = OpaqueLinkAttributeTlv.of(tlv1.getValue(), tlv1.getLength());
32 - private final OpaqueLinkAttributeTlv tlv2 = new OpaqueLinkAttributeTlv(rawValue2, (short) 0); 32 + private final OpaqueLinkAttributeTlv tlv2 = new OpaqueLinkAttributeTlv(rawValue2, (short) 0);
33 - 33 +
34 - @Test 34 + @Test
35 - public void basics() { 35 + public void basics() {
36 - new EqualsTester() 36 + new EqualsTester()
37 - .addEqualityGroup(tlv1, sameAsTlv1) 37 + .addEqualityGroup(tlv1, sameAsTlv1)
38 - .addEqualityGroup(tlv2) 38 + .addEqualityGroup(tlv2)
39 - .testEquals(); 39 + .testEquals();
40 - } 40 + }
41 -} 41 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.PathKeySubObject; 19 +import org.onosproject.pcepio.types.PathKeySubObject;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the PathKeySubObject. 24 + * Test of the PathKeySubObject.
25 - */ 25 + */
26 -public class PathKeySubObjectTest { 26 +public class PathKeySubObjectTest {
27 - 27 +
28 - private final PathKeySubObject tlv1 = new PathKeySubObject((short) 0x0A, 0x0A); 28 + private final PathKeySubObject tlv1 = new PathKeySubObject((short) 0x0A, 0x0A);
29 - private final PathKeySubObject sameAsTlv1 = PathKeySubObject.of((short) 0x0A, 0x0A); 29 + private final PathKeySubObject sameAsTlv1 = PathKeySubObject.of((short) 0x0A, 0x0A);
30 - private final PathKeySubObject tlv2 = new PathKeySubObject((short) 0x0B, 0x0B); 30 + private final PathKeySubObject tlv2 = new PathKeySubObject((short) 0x0B, 0x0B);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester() 34 + new EqualsTester()
35 - .addEqualityGroup(tlv1, sameAsTlv1) 35 + .addEqualityGroup(tlv1, sameAsTlv1)
36 - .addEqualityGroup(tlv2) 36 + .addEqualityGroup(tlv2)
37 - .testEquals(); 37 + .testEquals();
38 - } 38 + }
39 -} 39 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.PathSetupTypeTlv; 19 +import org.onosproject.pcepio.types.PathSetupTypeTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the PathSetupTypeTlv. 24 + * Test of the PathSetupTypeTlv.
25 - */ 25 + */
26 -public class PathSetupTypeTlvTest { 26 +public class PathSetupTypeTlvTest {
27 - 27 +
28 - private final PathSetupTypeTlv tlv1 = PathSetupTypeTlv.of(0x0A); 28 + private final PathSetupTypeTlv tlv1 = PathSetupTypeTlv.of(0x0A);
29 - private final PathSetupTypeTlv sameAsTlv1 = PathSetupTypeTlv.of(0x0A); 29 + private final PathSetupTypeTlv sameAsTlv1 = PathSetupTypeTlv.of(0x0A);
30 - private final PathSetupTypeTlv tlv2 = PathSetupTypeTlv.of(0x0B); 30 + private final PathSetupTypeTlv tlv2 = PathSetupTypeTlv.of(0x0B);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); 34 + new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals();
35 - } 35 + }
36 -} 36 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.PceccCapabilityTlv; 19 +import org.onosproject.pcepio.types.PceccCapabilityTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test of the PceccCapabilityTlv. 24 + * Test of the PceccCapabilityTlv.
25 - */ 25 + */
26 -public class PceccCapabilityTlvTest { 26 +public class PceccCapabilityTlvTest {
27 - private final int rawValue1 = 0x0A; 27 + private final int rawValue1 = 0x0A;
28 - private final int rawValue2 = 0x0B; 28 + private final int rawValue2 = 0x0B;
29 - 29 +
30 - private final PceccCapabilityTlv tlv1 = new PceccCapabilityTlv(rawValue1); 30 + private final PceccCapabilityTlv tlv1 = new PceccCapabilityTlv(rawValue1);
31 - private final PceccCapabilityTlv sameAsTlv1 = new PceccCapabilityTlv(rawValue1); 31 + private final PceccCapabilityTlv sameAsTlv1 = new PceccCapabilityTlv(rawValue1);
32 - private final PceccCapabilityTlv tlv2 = PceccCapabilityTlv.of(rawValue2); 32 + private final PceccCapabilityTlv tlv2 = PceccCapabilityTlv.of(rawValue2);
33 - 33 +
34 - @Test 34 + @Test
35 - public void basics() { 35 + public void basics() {
36 - new EqualsTester() 36 + new EqualsTester()
37 - .addEqualityGroup(tlv1, sameAsTlv1) 37 + .addEqualityGroup(tlv1, sameAsTlv1)
38 - .addEqualityGroup(tlv2) 38 + .addEqualityGroup(tlv2)
39 - .testEquals(); 39 + .testEquals();
40 - } 40 + }
41 -} 41 +}
......
1 -/* 1 +/*
2 - * Copyright 2014-2015 Open Networking Laboratory 2 + * Copyright 2014-2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.jboss.netty.buffer.ChannelBuffer; 18 +import org.jboss.netty.buffer.ChannelBuffer;
19 -import org.jboss.netty.buffer.ChannelBuffers; 19 +import org.jboss.netty.buffer.ChannelBuffers;
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.exceptions.PcepParseException; 21 +import org.onosproject.pcepio.exceptions.PcepParseException;
22 -import org.onosproject.pcepio.protocol.PcepCloseMsg; 22 +import org.onosproject.pcepio.protocol.PcepCloseMsg;
23 -import org.onosproject.pcepio.protocol.PcepFactories; 23 +import org.onosproject.pcepio.protocol.PcepFactories;
24 -import org.onosproject.pcepio.protocol.PcepMessage; 24 +import org.onosproject.pcepio.protocol.PcepMessage;
25 -import org.onosproject.pcepio.protocol.PcepMessageReader; 25 +import org.onosproject.pcepio.protocol.PcepMessageReader;
26 - 26 +
27 -import static org.hamcrest.MatcherAssert.assertThat; 27 +import static org.hamcrest.MatcherAssert.assertThat;
28 -import static org.hamcrest.core.Is.is; 28 +import static org.hamcrest.core.Is.is;
29 -import static org.hamcrest.core.IsSame.sameInstance; 29 +import static org.hamcrest.core.IsSame.sameInstance;
30 - 30 +
31 -public class PcepCloseMsgTest { 31 +public class PcepCloseMsgTest {
32 - 32 +
33 - /** 33 + /**
34 - * Common header, reason to close. 34 + * Common header, reason to close.
35 - */ 35 + */
36 - @Test 36 + @Test
37 - public void closeMessageTest1() throws PcepParseException { 37 + public void closeMessageTest1() throws PcepParseException {
38 - 38 +
39 - byte[] closeMsg = new byte[] {0x20, 0x07, 0x00, 0x0C, 0x0f, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02 }; 39 + byte[] closeMsg = new byte[] {0x20, 0x07, 0x00, 0x0C, 0x0f, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02 };
40 - 40 +
41 - byte[] testCloseMsg = {0 }; 41 + byte[] testCloseMsg = {0 };
42 - ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); 42 + ChannelBuffer buffer = ChannelBuffers.dynamicBuffer();
43 - buffer.writeBytes(closeMsg); 43 + buffer.writeBytes(closeMsg);
44 - 44 +
45 - PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); 45 + PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader();
46 - PcepMessage message; 46 + PcepMessage message;
47 - 47 +
48 - message = reader.readFrom(buffer); 48 + message = reader.readFrom(buffer);
49 - assertThat(message, sameInstance((PcepCloseMsg) message)); 49 + assertThat(message, sameInstance((PcepCloseMsg) message));
50 - 50 +
51 - ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); 51 + ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
52 - message.writeTo(buf); 52 + message.writeTo(buf);
53 - testCloseMsg = buf.array(); 53 + testCloseMsg = buf.array();
54 - 54 +
55 - int readLen = buf.writerIndex(); 55 + int readLen = buf.writerIndex();
56 - testCloseMsg = new byte[readLen]; 56 + testCloseMsg = new byte[readLen];
57 - buf.readBytes(testCloseMsg, 0, readLen); 57 + buf.readBytes(testCloseMsg, 0, readLen);
58 - assertThat(testCloseMsg, is(closeMsg)); 58 + assertThat(testCloseMsg, is(closeMsg));
59 - } 59 + }
60 -} 60 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.PcepNaiIpv4NodeId; 19 +import org.onosproject.pcepio.types.PcepNaiIpv4NodeId;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -public class PcepNaiIpv4NodeIdTest { 23 +public class PcepNaiIpv4NodeIdTest {
24 - 24 +
25 - private final PcepNaiIpv4NodeId tlv1 = PcepNaiIpv4NodeId.of(1); 25 + private final PcepNaiIpv4NodeId tlv1 = PcepNaiIpv4NodeId.of(1);
26 - private final PcepNaiIpv4NodeId tlv2 = PcepNaiIpv4NodeId.of(1); 26 + private final PcepNaiIpv4NodeId tlv2 = PcepNaiIpv4NodeId.of(1);
27 - private final PcepNaiIpv4NodeId tlv3 = PcepNaiIpv4NodeId.of(3); 27 + private final PcepNaiIpv4NodeId tlv3 = PcepNaiIpv4NodeId.of(3);
28 - 28 +
29 - @Test 29 + @Test
30 - public void basics() { 30 + public void basics() {
31 - new EqualsTester() 31 + new EqualsTester()
32 - .addEqualityGroup(tlv1, tlv2) 32 + .addEqualityGroup(tlv1, tlv2)
33 - .addEqualityGroup(tlv3) 33 + .addEqualityGroup(tlv3)
34 - .testEquals(); 34 + .testEquals();
35 - } 35 + }
36 -} 36 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.PcepNaiIpv6Adjacency; 19 +import org.onosproject.pcepio.types.PcepNaiIpv6Adjacency;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -public class PcepNaiIpv6AdjacencyTest { 23 +public class PcepNaiIpv6AdjacencyTest {
24 - private final byte[] localIpv6Addr1 = {(byte) 0x01010101 }; 24 + private final byte[] localIpv6Addr1 = {(byte) 0x01010101 };
25 - private final byte[] remoteIpv6Addr1 = {(byte) 0x02020202 }; 25 + private final byte[] remoteIpv6Addr1 = {(byte) 0x02020202 };
26 - private final byte[] localIpv6Addr2 = {(byte) 0x01010101 }; 26 + private final byte[] localIpv6Addr2 = {(byte) 0x01010101 };
27 - private final byte[] remoteIpv6Addr2 = {(byte) 0x02020202 }; 27 + private final byte[] remoteIpv6Addr2 = {(byte) 0x02020202 };
28 - private final byte[] localIpv6Addr3 = {(byte) 0x05050505 }; 28 + private final byte[] localIpv6Addr3 = {(byte) 0x05050505 };
29 - private final byte[] remoteIpv6Addr3 = {(byte) 0x06060606 }; 29 + private final byte[] remoteIpv6Addr3 = {(byte) 0x06060606 };
30 - 30 +
31 - private final PcepNaiIpv6Adjacency tlv1 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1); 31 + private final PcepNaiIpv6Adjacency tlv1 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1);
32 - private final PcepNaiIpv6Adjacency tlv2 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1); 32 + private final PcepNaiIpv6Adjacency tlv2 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1);
33 - private final PcepNaiIpv6Adjacency tlv3 = PcepNaiIpv6Adjacency.of(localIpv6Addr3, remoteIpv6Addr3); 33 + private final PcepNaiIpv6Adjacency tlv3 = PcepNaiIpv6Adjacency.of(localIpv6Addr3, remoteIpv6Addr3);
34 - 34 +
35 - @Test 35 + @Test
36 - public void basics() { 36 + public void basics() {
37 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 37 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
38 - } 38 + }
39 } 39 }
...\ No newline at end of file ...\ No newline at end of file
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.PcepNaiUnnumberedAdjacencyIpv4; 19 +import org.onosproject.pcepio.types.PcepNaiUnnumberedAdjacencyIpv4;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -public class PcepNaiUnnumberedAdjacencyIpv4Test { 23 +public class PcepNaiUnnumberedAdjacencyIpv4Test {
24 - 24 +
25 - private final int localNodeId1 = 1; 25 + private final int localNodeId1 = 1;
26 - private final int localInterfaceId1 = 1; 26 + private final int localInterfaceId1 = 1;
27 - private final int remoteNodeId1 = 1; 27 + private final int remoteNodeId1 = 1;
28 - private final int remoteInterfaceId1 = 1; 28 + private final int remoteInterfaceId1 = 1;
29 - private final PcepNaiUnnumberedAdjacencyIpv4 tlv1 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId1, 29 + private final PcepNaiUnnumberedAdjacencyIpv4 tlv1 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId1,
30 - localInterfaceId1, remoteNodeId1, remoteInterfaceId1); 30 + localInterfaceId1, remoteNodeId1, remoteInterfaceId1);
31 - 31 +
32 - private final int localNodeId2 = 1; 32 + private final int localNodeId2 = 1;
33 - private final int localInterfaceId2 = 1; 33 + private final int localInterfaceId2 = 1;
34 - private final int remoteNodeId2 = 1; 34 + private final int remoteNodeId2 = 1;
35 - private final int remoteInterfaceId2 = 1; 35 + private final int remoteInterfaceId2 = 1;
36 - private final PcepNaiUnnumberedAdjacencyIpv4 tlv2 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId2, 36 + private final PcepNaiUnnumberedAdjacencyIpv4 tlv2 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId2,
37 - localInterfaceId2, remoteNodeId2, remoteInterfaceId2); 37 + localInterfaceId2, remoteNodeId2, remoteInterfaceId2);
38 - 38 +
39 - private final int localNodeId3 = 2; 39 + private final int localNodeId3 = 2;
40 - private final int localInterfaceId3 = 2; 40 + private final int localInterfaceId3 = 2;
41 - private final int remoteNodeId3 = 2; 41 + private final int remoteNodeId3 = 2;
42 - private final int remoteInterfaceId3 = 2; 42 + private final int remoteInterfaceId3 = 2;
43 - 43 +
44 - private final PcepNaiUnnumberedAdjacencyIpv4 tlv3 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId3, 44 + private final PcepNaiUnnumberedAdjacencyIpv4 tlv3 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId3,
45 - localInterfaceId3, remoteNodeId3, remoteInterfaceId3); 45 + localInterfaceId3, remoteNodeId3, remoteInterfaceId3);
46 - 46 +
47 - @Test 47 + @Test
48 - public void basics() { 48 + public void basics() {
49 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 49 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
50 - } 50 + }
51 -} 51 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import java.util.LinkedList; 18 +import java.util.LinkedList;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.AutonomousSystemTlv; 21 +import org.onosproject.pcepio.types.AutonomousSystemTlv;
22 -import org.onosproject.pcepio.types.BGPLSidentifierTlv; 22 +import org.onosproject.pcepio.types.BGPLSidentifierTlv;
23 -import org.onosproject.pcepio.types.PcepValueType; 23 +import org.onosproject.pcepio.types.PcepValueType;
24 -import org.onosproject.pcepio.types.RemoteTENodeDescriptorsTlv; 24 +import org.onosproject.pcepio.types.RemoteTENodeDescriptorsTlv;
25 - 25 +
26 -import com.google.common.testing.EqualsTester; 26 +import com.google.common.testing.EqualsTester;
27 - 27 +
28 -/** 28 +/**
29 - * Test case for Remote TE Node Descriptors tlv. 29 + * Test case for Remote TE Node Descriptors tlv.
30 - */ 30 + */
31 -public class RemoteTENodeDescriptorsTlvTest { 31 +public class RemoteTENodeDescriptorsTlvTest {
32 - 32 +
33 - private final AutonomousSystemTlv autonomousSystemTlv1 = new AutonomousSystemTlv(10); 33 + private final AutonomousSystemTlv autonomousSystemTlv1 = new AutonomousSystemTlv(10);
34 - private final BGPLSidentifierTlv bGPLSidentifierTlv1 = new BGPLSidentifierTlv(20); 34 + private final BGPLSidentifierTlv bGPLSidentifierTlv1 = new BGPLSidentifierTlv(20);
35 - 35 +
36 - private final AutonomousSystemTlv autonomousSystemTlv2 = new AutonomousSystemTlv(20); 36 + private final AutonomousSystemTlv autonomousSystemTlv2 = new AutonomousSystemTlv(20);
37 - private final BGPLSidentifierTlv bGPLSidentifierTlv2 = new BGPLSidentifierTlv(30); 37 + private final BGPLSidentifierTlv bGPLSidentifierTlv2 = new BGPLSidentifierTlv(30);
38 - 38 +
39 - private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV1 = new LinkedList<>(); 39 + private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV1 = new LinkedList<>();
40 - private final boolean a = llRemoteTENodeDescriptorSubTLV1.add(autonomousSystemTlv1); 40 + private final boolean a = llRemoteTENodeDescriptorSubTLV1.add(autonomousSystemTlv1);
41 - private final boolean b = llRemoteTENodeDescriptorSubTLV1.add(bGPLSidentifierTlv1); 41 + private final boolean b = llRemoteTENodeDescriptorSubTLV1.add(bGPLSidentifierTlv1);
42 - 42 +
43 - private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV2 = new LinkedList<>(); 43 + private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV2 = new LinkedList<>();
44 - private final boolean c = llRemoteTENodeDescriptorSubTLV2.add(autonomousSystemTlv2); 44 + private final boolean c = llRemoteTENodeDescriptorSubTLV2.add(autonomousSystemTlv2);
45 - private final boolean d = llRemoteTENodeDescriptorSubTLV2.add(bGPLSidentifierTlv2); 45 + private final boolean d = llRemoteTENodeDescriptorSubTLV2.add(bGPLSidentifierTlv2);
46 - 46 +
47 - private final RemoteTENodeDescriptorsTlv tlv1 = RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV1); 47 + private final RemoteTENodeDescriptorsTlv tlv1 = RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV1);
48 - private final RemoteTENodeDescriptorsTlv sameAsTlv1 = 48 + private final RemoteTENodeDescriptorsTlv sameAsTlv1 =
49 - RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV1); 49 + RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV1);
50 - private final RemoteTENodeDescriptorsTlv tlv2 = RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV2); 50 + private final RemoteTENodeDescriptorsTlv tlv2 = RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV2);
51 - 51 +
52 - @Test 52 + @Test
53 - public void basics() { 53 + public void basics() {
54 - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); 54 + new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals();
55 - } 55 + }
56 - 56 +
57 -} 57 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.RouterIDSubTlv; 19 +import org.onosproject.pcepio.types.RouterIDSubTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test case for Router ID Sub tlv. 24 + * Test case for Router ID Sub tlv.
25 - */ 25 + */
26 -public class RouterIDSubTlvTest { 26 +public class RouterIDSubTlvTest {
27 - 27 +
28 - private final byte[] value1 = {1, 2 }; 28 + private final byte[] value1 = {1, 2 };
29 - private final Short length1 = new Short((short) 2); 29 + private final Short length1 = new Short((short) 2);
30 - private final RouterIDSubTlv tlv1 = RouterIDSubTlv.of(value1, length1); 30 + private final RouterIDSubTlv tlv1 = RouterIDSubTlv.of(value1, length1);
31 - 31 +
32 - private final Short length2 = new Short((short) 2); 32 + private final Short length2 = new Short((short) 2);
33 - private final RouterIDSubTlv tlv2 = RouterIDSubTlv.of(value1, length2); 33 + private final RouterIDSubTlv tlv2 = RouterIDSubTlv.of(value1, length2);
34 - 34 +
35 - private final byte[] value3 = {1, 2, 3 }; 35 + private final byte[] value3 = {1, 2, 3 };
36 - private final Short length3 = new Short((short) 3); 36 + private final Short length3 = new Short((short) 3);
37 - private final RouterIDSubTlv tlv3 = RouterIDSubTlv.of(value3, length3); 37 + private final RouterIDSubTlv tlv3 = RouterIDSubTlv.of(value3, length3);
38 - 38 +
39 - @Test 39 + @Test
40 - public void basics() { 40 + public void basics() {
41 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 41 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
42 - } 42 + }
43 - 43 +
44 -} 44 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.SharedRiskLinkGroupTlv; 19 +import org.onosproject.pcepio.types.SharedRiskLinkGroupTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test case for Shared Risk Link Group tlv. 24 + * Test case for Shared Risk Link Group tlv.
25 - */ 25 + */
26 -public class SharedRiskLinkGroupTlvTest { 26 +public class SharedRiskLinkGroupTlvTest {
27 - 27 +
28 - private final int[] raw = {1 }; 28 + private final int[] raw = {1 };
29 - private final Short hLength = new Short((short) 2); 29 + private final Short hLength = new Short((short) 2);
30 - private final SharedRiskLinkGroupTlv tlv1 = SharedRiskLinkGroupTlv.of(raw, hLength); 30 + private final SharedRiskLinkGroupTlv tlv1 = SharedRiskLinkGroupTlv.of(raw, hLength);
31 - 31 +
32 - private final SharedRiskLinkGroupTlv sameAsTlv1 = SharedRiskLinkGroupTlv.of(raw, hLength); 32 + private final SharedRiskLinkGroupTlv sameAsTlv1 = SharedRiskLinkGroupTlv.of(raw, hLength);
33 - 33 +
34 - private final int[] raw2 = {2 }; 34 + private final int[] raw2 = {2 };
35 - private final Short hLength2 = new Short((short) 3); 35 + private final Short hLength2 = new Short((short) 3);
36 - private final SharedRiskLinkGroupTlv tlv2 = SharedRiskLinkGroupTlv.of(raw2, hLength2); 36 + private final SharedRiskLinkGroupTlv tlv2 = SharedRiskLinkGroupTlv.of(raw2, hLength2);
37 - 37 +
38 - @Test 38 + @Test
39 - public void basics() { 39 + public void basics() {
40 - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); 40 + new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals();
41 - } 41 + }
42 - 42 +
43 -} 43 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.protocol.PcepNai; 19 +import org.onosproject.pcepio.protocol.PcepNai;
20 -import org.onosproject.pcepio.types.SrEroSubObject; 20 +import org.onosproject.pcepio.types.SrEroSubObject;
21 - 21 +
22 -import com.google.common.testing.EqualsTester; 22 +import com.google.common.testing.EqualsTester;
23 - 23 +
24 -public class SrEroSubObjectTest { 24 +public class SrEroSubObjectTest {
25 - 25 +
26 - private final boolean bFFlag = false; 26 + private final boolean bFFlag = false;
27 - private final boolean bSFlag = false; 27 + private final boolean bSFlag = false;
28 - private final boolean bCFlag = false; 28 + private final boolean bCFlag = false;
29 - private final boolean bMFlag = false; 29 + private final boolean bMFlag = false;
30 - private final byte st = 1; 30 + private final byte st = 1;
31 - private final int sID = 1; 31 + private final int sID = 1;
32 - private final PcepNai nai = null; 32 + private final PcepNai nai = null;
33 - 33 +
34 - private final SrEroSubObject tlv1 = SrEroSubObject.of(st, bFFlag, bSFlag, bCFlag, bMFlag, sID, nai); 34 + private final SrEroSubObject tlv1 = SrEroSubObject.of(st, bFFlag, bSFlag, bCFlag, bMFlag, sID, nai);
35 - 35 +
36 - private final boolean bFFlag1 = false; 36 + private final boolean bFFlag1 = false;
37 - private final boolean bSFlag1 = false; 37 + private final boolean bSFlag1 = false;
38 - private final boolean bCFlag1 = false; 38 + private final boolean bCFlag1 = false;
39 - private final boolean bMFlag1 = false; 39 + private final boolean bMFlag1 = false;
40 - private final byte st1 = 1; 40 + private final byte st1 = 1;
41 - private final int sID1 = 1; 41 + private final int sID1 = 1;
42 - private final PcepNai nai1 = null; 42 + private final PcepNai nai1 = null;
43 - 43 +
44 - private final SrEroSubObject tlv2 = SrEroSubObject.of(st1, bFFlag1, bSFlag1, bCFlag1, bMFlag1, sID1, nai1); 44 + private final SrEroSubObject tlv2 = SrEroSubObject.of(st1, bFFlag1, bSFlag1, bCFlag1, bMFlag1, sID1, nai1);
45 - 45 +
46 - private final boolean bFFlag2 = true; 46 + private final boolean bFFlag2 = true;
47 - private final boolean bSFlag2 = true; 47 + private final boolean bSFlag2 = true;
48 - private final boolean bCFlag2 = true; 48 + private final boolean bCFlag2 = true;
49 - private final boolean bMFlag2 = true; 49 + private final boolean bMFlag2 = true;
50 - private final byte st2 = 2; 50 + private final byte st2 = 2;
51 - private final int sID2 = 2; 51 + private final int sID2 = 2;
52 - private final PcepNai nai2 = null; 52 + private final PcepNai nai2 = null;
53 - 53 +
54 - private final SrEroSubObject tlv3 = SrEroSubObject.of(st2, bFFlag2, bSFlag2, bCFlag2, bMFlag2, sID2, nai2); 54 + private final SrEroSubObject tlv3 = SrEroSubObject.of(st2, bFFlag2, bSFlag2, bCFlag2, bMFlag2, sID2, nai2);
55 - 55 +
56 - @Test 56 + @Test
57 - public void basics() { 57 + public void basics() {
58 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 58 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
59 - } 59 + }
60 - 60 +
61 -} 61 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.StatefulIPv4LspIdentidiersTlv; 19 +import org.onosproject.pcepio.types.StatefulIPv4LspIdentidiersTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -public class StatefulIPv4LspIdentidiersTlvTest { 23 +public class StatefulIPv4LspIdentidiersTlvTest {
24 - 24 +
25 - private final int ipv4IngressAddress = 1; 25 + private final int ipv4IngressAddress = 1;
26 - private final short lspId = 1; 26 + private final short lspId = 1;
27 - private final short tunnelId = 1; 27 + private final short tunnelId = 1;
28 - private final int extendedTunnelId = 1; 28 + private final int extendedTunnelId = 1;
29 - private final int ipv4EgressAddress = 1; 29 + private final int ipv4EgressAddress = 1;
30 - 30 +
31 - private final StatefulIPv4LspIdentidiersTlv tlv1 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress, lspId, 31 + private final StatefulIPv4LspIdentidiersTlv tlv1 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress, lspId,
32 - tunnelId, extendedTunnelId, ipv4EgressAddress); 32 + tunnelId, extendedTunnelId, ipv4EgressAddress);
33 - 33 +
34 - private final int ipv4IngressAddress1 = 1; 34 + private final int ipv4IngressAddress1 = 1;
35 - private final short lspId1 = 1; 35 + private final short lspId1 = 1;
36 - private final short tunnelId1 = 1; 36 + private final short tunnelId1 = 1;
37 - private final int extendedTunnelId1 = 1; 37 + private final int extendedTunnelId1 = 1;
38 - private final int ipv4EgressAddress1 = 1; 38 + private final int ipv4EgressAddress1 = 1;
39 - 39 +
40 - private final StatefulIPv4LspIdentidiersTlv tlv2 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress1, lspId1, 40 + private final StatefulIPv4LspIdentidiersTlv tlv2 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress1, lspId1,
41 - tunnelId1, extendedTunnelId1, ipv4EgressAddress1); 41 + tunnelId1, extendedTunnelId1, ipv4EgressAddress1);
42 - 42 +
43 - private final int ipv4IngressAddress2 = 2; 43 + private final int ipv4IngressAddress2 = 2;
44 - private final short lspId2 = 2; 44 + private final short lspId2 = 2;
45 - private final short tunnelId2 = 2; 45 + private final short tunnelId2 = 2;
46 - private final int extendedTunnelId2 = 2; 46 + private final int extendedTunnelId2 = 2;
47 - private final int ipv4EgressAddress2 = 2; 47 + private final int ipv4EgressAddress2 = 2;
48 - 48 +
49 - private final StatefulIPv4LspIdentidiersTlv tlv3 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress2, lspId2, 49 + private final StatefulIPv4LspIdentidiersTlv tlv3 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress2, lspId2,
50 - tunnelId2, extendedTunnelId2, ipv4EgressAddress2); 50 + tunnelId2, extendedTunnelId2, ipv4EgressAddress2);
51 - 51 +
52 - @Test 52 + @Test
53 - public void basics() { 53 + public void basics() {
54 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 54 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
55 - 55 +
56 - } 56 + }
57 -} 57 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.StatefulLspDbVerTlv; 19 +import org.onosproject.pcepio.types.StatefulLspDbVerTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test case for Stateful Lsp Db Ver tlv. 24 + * Test case for Stateful Lsp Db Ver tlv.
25 - */ 25 + */
26 -public class StatefulLspDbVerTlvTest { 26 +public class StatefulLspDbVerTlvTest {
27 - 27 +
28 - private final StatefulLspDbVerTlv tlv1 = StatefulLspDbVerTlv.of(1); 28 + private final StatefulLspDbVerTlv tlv1 = StatefulLspDbVerTlv.of(1);
29 - private final StatefulLspDbVerTlv tlv2 = StatefulLspDbVerTlv.of(1); 29 + private final StatefulLspDbVerTlv tlv2 = StatefulLspDbVerTlv.of(1);
30 - private final StatefulLspDbVerTlv tlv3 = StatefulLspDbVerTlv.of(2); 30 + private final StatefulLspDbVerTlv tlv3 = StatefulLspDbVerTlv.of(2);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 34 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
35 - } 35 + }
36 - 36 +
37 -} 37 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.StatefulLspErrorCodeTlv; 19 +import org.onosproject.pcepio.types.StatefulLspErrorCodeTlv;
20 -import com.google.common.testing.EqualsTester; 20 +import com.google.common.testing.EqualsTester;
21 - 21 +
22 -public class StatefulLspErrorCodeTlvTest { 22 +public class StatefulLspErrorCodeTlvTest {
23 - 23 +
24 - private final StatefulLspErrorCodeTlv tlv1 = StatefulLspErrorCodeTlv.of(1); 24 + private final StatefulLspErrorCodeTlv tlv1 = StatefulLspErrorCodeTlv.of(1);
25 - private final StatefulLspErrorCodeTlv tlv2 = StatefulLspErrorCodeTlv.of(1); 25 + private final StatefulLspErrorCodeTlv tlv2 = StatefulLspErrorCodeTlv.of(1);
26 - private final StatefulLspErrorCodeTlv tlv3 = StatefulLspErrorCodeTlv.of(2); 26 + private final StatefulLspErrorCodeTlv tlv3 = StatefulLspErrorCodeTlv.of(2);
27 - 27 +
28 - @Test 28 + @Test
29 - public void basics() { 29 + public void basics() {
30 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 30 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
31 - } 31 + }
32 -} 32 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.StatefulPceCapabilityTlv; 19 +import org.onosproject.pcepio.types.StatefulPceCapabilityTlv;
20 -import com.google.common.testing.EqualsTester; 20 +import com.google.common.testing.EqualsTester;
21 - 21 +
22 -/** 22 +/**
23 - * Test case for Stateful Pce Capability tlv. 23 + * Test case for Stateful Pce Capability tlv.
24 - */ 24 + */
25 -public class StatefulPceCapabilityTlvTest { 25 +public class StatefulPceCapabilityTlvTest {
26 - 26 +
27 - private final StatefulPceCapabilityTlv tlv1 = StatefulPceCapabilityTlv.of(1); 27 + private final StatefulPceCapabilityTlv tlv1 = StatefulPceCapabilityTlv.of(1);
28 - private final StatefulPceCapabilityTlv tlv2 = StatefulPceCapabilityTlv.of(1); 28 + private final StatefulPceCapabilityTlv tlv2 = StatefulPceCapabilityTlv.of(1);
29 - private final StatefulPceCapabilityTlv tlv3 = StatefulPceCapabilityTlv.of(2); 29 + private final StatefulPceCapabilityTlv tlv3 = StatefulPceCapabilityTlv.of(2);
30 - 30 +
31 - @Test 31 + @Test
32 - public void basics() { 32 + public void basics() {
33 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 33 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
34 - } 34 + }
35 -} 35 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.SymbolicPathNameTlv; 19 +import org.onosproject.pcepio.types.SymbolicPathNameTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test case for Symbolic path tlv. 24 + * Test case for Symbolic path tlv.
25 - */ 25 + */
26 -public class SymbolicPathNameTlvTest { 26 +public class SymbolicPathNameTlvTest {
27 - 27 +
28 - private final byte[] value1 = {0x41 }; 28 + private final byte[] value1 = {0x41 };
29 - private final Short length1 = new Short((short) 2); 29 + private final Short length1 = new Short((short) 2);
30 - private final SymbolicPathNameTlv tlv1 = SymbolicPathNameTlv.of(value1, length1); 30 + private final SymbolicPathNameTlv tlv1 = SymbolicPathNameTlv.of(value1, length1);
31 - 31 +
32 - private final byte[] value2 = {0x41 }; 32 + private final byte[] value2 = {0x41 };
33 - private final Short length2 = new Short((short) 2); 33 + private final Short length2 = new Short((short) 2);
34 - private final SymbolicPathNameTlv tlv2 = SymbolicPathNameTlv.of(value1, length2); 34 + private final SymbolicPathNameTlv tlv2 = SymbolicPathNameTlv.of(value1, length2);
35 - 35 +
36 - private final byte[] value3 = {0x41, 0x43 }; 36 + private final byte[] value3 = {0x41, 0x43 };
37 - private final Short length3 = new Short((short) 3); 37 + private final Short length3 = new Short((short) 3);
38 - private final SymbolicPathNameTlv tlv3 = SymbolicPathNameTlv.of(value3, length3); 38 + private final SymbolicPathNameTlv tlv3 = SymbolicPathNameTlv.of(value3, length3);
39 - 39 +
40 - @Test 40 + @Test
41 - public void basics() { 41 + public void basics() {
42 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 42 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
43 - } 43 + }
44 - 44 +
45 -} 45 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.TEDefaultMetricTlv; 19 +import org.onosproject.pcepio.types.TEDefaultMetricTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test case for TE Default Metric tlv. 24 + * Test case for TE Default Metric tlv.
25 - */ 25 + */
26 -public class TEDefaultMetricTlvTest { 26 +public class TEDefaultMetricTlvTest {
27 - 27 +
28 - private final TEDefaultMetricTlv tlv1 = TEDefaultMetricTlv.of(1); 28 + private final TEDefaultMetricTlv tlv1 = TEDefaultMetricTlv.of(1);
29 - private final TEDefaultMetricTlv tlv2 = TEDefaultMetricTlv.of(1); 29 + private final TEDefaultMetricTlv tlv2 = TEDefaultMetricTlv.of(1);
30 - private final TEDefaultMetricTlv tlv3 = TEDefaultMetricTlv.of(2); 30 + private final TEDefaultMetricTlv tlv3 = TEDefaultMetricTlv.of(2);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 34 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
35 - } 35 + }
36 } 36 }
...\ No newline at end of file ...\ No newline at end of file
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import java.util.LinkedList; 18 +import java.util.LinkedList;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.AdministrativeGroupTlv; 21 +import org.onosproject.pcepio.types.AdministrativeGroupTlv;
22 -import org.onosproject.pcepio.types.MaximumReservableLinkBandwidthTlv; 22 +import org.onosproject.pcepio.types.MaximumReservableLinkBandwidthTlv;
23 -import org.onosproject.pcepio.types.PcepValueType; 23 +import org.onosproject.pcepio.types.PcepValueType;
24 -import org.onosproject.pcepio.types.TELinkAttributesTlv; 24 +import org.onosproject.pcepio.types.TELinkAttributesTlv;
25 - 25 +
26 -import com.google.common.testing.EqualsTester; 26 +import com.google.common.testing.EqualsTester;
27 - 27 +
28 -/** 28 +/**
29 - * Test case for TE Link Attribute Tlv. 29 + * Test case for TE Link Attribute Tlv.
30 - */ 30 + */
31 -public class TELinkAttributesTlvTest { 31 +public class TELinkAttributesTlvTest {
32 - 32 +
33 - private final AdministrativeGroupTlv administrativeGroupTlv1 = new AdministrativeGroupTlv(10); 33 + private final AdministrativeGroupTlv administrativeGroupTlv1 = new AdministrativeGroupTlv(10);
34 - private final MaximumReservableLinkBandwidthTlv maximumReservableLinkBandwidthTlv1 = 34 + private final MaximumReservableLinkBandwidthTlv maximumReservableLinkBandwidthTlv1 =
35 - new MaximumReservableLinkBandwidthTlv(20); 35 + new MaximumReservableLinkBandwidthTlv(20);
36 - 36 +
37 - private final AdministrativeGroupTlv administrativeGroupTlv2 = new AdministrativeGroupTlv(20); 37 + private final AdministrativeGroupTlv administrativeGroupTlv2 = new AdministrativeGroupTlv(20);
38 - private final MaximumReservableLinkBandwidthTlv maximumReservableLinkBandwidthTlv2 = 38 + private final MaximumReservableLinkBandwidthTlv maximumReservableLinkBandwidthTlv2 =
39 - new MaximumReservableLinkBandwidthTlv(30); 39 + new MaximumReservableLinkBandwidthTlv(30);
40 - 40 +
41 - private final LinkedList<PcepValueType> llLinkAttributesSubTLV1 = new LinkedList<>(); 41 + private final LinkedList<PcepValueType> llLinkAttributesSubTLV1 = new LinkedList<>();
42 - private final boolean a = llLinkAttributesSubTLV1.add(administrativeGroupTlv1); 42 + private final boolean a = llLinkAttributesSubTLV1.add(administrativeGroupTlv1);
43 - private final boolean b = llLinkAttributesSubTLV1.add(maximumReservableLinkBandwidthTlv1); 43 + private final boolean b = llLinkAttributesSubTLV1.add(maximumReservableLinkBandwidthTlv1);
44 - 44 +
45 - private final LinkedList<PcepValueType> llLinkAttributesSubTLV2 = new LinkedList<>(); 45 + private final LinkedList<PcepValueType> llLinkAttributesSubTLV2 = new LinkedList<>();
46 - 46 +
47 - private final boolean c = llLinkAttributesSubTLV2.add(administrativeGroupTlv2); 47 + private final boolean c = llLinkAttributesSubTLV2.add(administrativeGroupTlv2);
48 - private final boolean d = llLinkAttributesSubTLV2.add(maximumReservableLinkBandwidthTlv2); 48 + private final boolean d = llLinkAttributesSubTLV2.add(maximumReservableLinkBandwidthTlv2);
49 - 49 +
50 - private final TELinkAttributesTlv tlv1 = TELinkAttributesTlv.of(llLinkAttributesSubTLV1); 50 + private final TELinkAttributesTlv tlv1 = TELinkAttributesTlv.of(llLinkAttributesSubTLV1);
51 - private final TELinkAttributesTlv sameAsTlv1 = TELinkAttributesTlv.of(llLinkAttributesSubTLV1); 51 + private final TELinkAttributesTlv sameAsTlv1 = TELinkAttributesTlv.of(llLinkAttributesSubTLV1);
52 - private final TELinkAttributesTlv tlv2 = TELinkAttributesTlv.of(llLinkAttributesSubTLV2); 52 + private final TELinkAttributesTlv tlv2 = TELinkAttributesTlv.of(llLinkAttributesSubTLV2);
53 - 53 +
54 - @Test 54 + @Test
55 - public void basics() { 55 + public void basics() {
56 - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); 56 + new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals();
57 - } 57 + }
58 - 58 +
59 -} 59 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import java.util.LinkedList; 18 +import java.util.LinkedList;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv; 21 +import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv;
22 -import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv; 22 +import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv;
23 -import org.onosproject.pcepio.types.PcepValueType; 23 +import org.onosproject.pcepio.types.PcepValueType;
24 -import org.onosproject.pcepio.types.TELinkDescriptorsTlv; 24 +import org.onosproject.pcepio.types.TELinkDescriptorsTlv;
25 - 25 +
26 -import com.google.common.testing.EqualsTester; 26 +import com.google.common.testing.EqualsTester;
27 - 27 +
28 -/** 28 +/**
29 - * Test case for TE link descriptors Tlv. 29 + * Test case for TE link descriptors Tlv.
30 - */ 30 + */
31 -public class TELinkDescriptorsTlvTest { 31 +public class TELinkDescriptorsTlvTest {
32 - private final LinkLocalRemoteIdentifiersTlv linkLocalRemoteIdentifiersTlv1 = new 32 + private final LinkLocalRemoteIdentifiersTlv linkLocalRemoteIdentifiersTlv1 = new
33 - LinkLocalRemoteIdentifiersTlv(10, 10); 33 + LinkLocalRemoteIdentifiersTlv(10, 10);
34 - private final IPv4InterfaceAddressTlv iPv4InterfaceAddressTlv1 = new IPv4InterfaceAddressTlv(0x01010101); 34 + private final IPv4InterfaceAddressTlv iPv4InterfaceAddressTlv1 = new IPv4InterfaceAddressTlv(0x01010101);
35 - 35 +
36 - private final LinkLocalRemoteIdentifiersTlv linkLocalRemoteIdentifiersTlv2 = new 36 + private final LinkLocalRemoteIdentifiersTlv linkLocalRemoteIdentifiersTlv2 = new
37 - LinkLocalRemoteIdentifiersTlv(20, 20); 37 + LinkLocalRemoteIdentifiersTlv(20, 20);
38 - private final IPv4InterfaceAddressTlv iPv4InterfaceAddressTlv2 = new IPv4InterfaceAddressTlv(0x02020202); 38 + private final IPv4InterfaceAddressTlv iPv4InterfaceAddressTlv2 = new IPv4InterfaceAddressTlv(0x02020202);
39 - 39 +
40 - private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs1 = new LinkedList<>(); 40 + private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs1 = new LinkedList<>();
41 - private final boolean a = llLinkDescriptorsSubTLVs1.add(linkLocalRemoteIdentifiersTlv1); 41 + private final boolean a = llLinkDescriptorsSubTLVs1.add(linkLocalRemoteIdentifiersTlv1);
42 - private final boolean b = llLinkDescriptorsSubTLVs1.add(iPv4InterfaceAddressTlv1); 42 + private final boolean b = llLinkDescriptorsSubTLVs1.add(iPv4InterfaceAddressTlv1);
43 - 43 +
44 - private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs2 = new LinkedList<>(); 44 + private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs2 = new LinkedList<>();
45 - private final boolean c = llLinkDescriptorsSubTLVs2.add(linkLocalRemoteIdentifiersTlv2); 45 + private final boolean c = llLinkDescriptorsSubTLVs2.add(linkLocalRemoteIdentifiersTlv2);
46 - private final boolean d = llLinkDescriptorsSubTLVs2.add(iPv4InterfaceAddressTlv2); 46 + private final boolean d = llLinkDescriptorsSubTLVs2.add(iPv4InterfaceAddressTlv2);
47 - 47 +
48 - private final TELinkDescriptorsTlv tlv1 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs1); 48 + private final TELinkDescriptorsTlv tlv1 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs1);
49 - private final TELinkDescriptorsTlv sameAstlv1 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs1); 49 + private final TELinkDescriptorsTlv sameAstlv1 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs1);
50 - private final TELinkDescriptorsTlv tlv2 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs2); 50 + private final TELinkDescriptorsTlv tlv2 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs2);
51 - 51 +
52 - @Test 52 + @Test
53 - public void basics() { 53 + public void basics() {
54 - new EqualsTester().addEqualityGroup(tlv1, sameAstlv1).addEqualityGroup(tlv2).testEquals(); 54 + new EqualsTester().addEqualityGroup(tlv1, sameAstlv1).addEqualityGroup(tlv2).testEquals();
55 - } 55 + }
56 - 56 +
57 -} 57 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import java.util.LinkedList; 18 +import java.util.LinkedList;
19 - 19 +
20 -import org.junit.Test; 20 +import org.junit.Test;
21 -import org.onosproject.pcepio.types.IPv4TERouterIdOfLocalNodeTlv; 21 +import org.onosproject.pcepio.types.IPv4TERouterIdOfLocalNodeTlv;
22 -import org.onosproject.pcepio.types.NodeFlagBitsTlv; 22 +import org.onosproject.pcepio.types.NodeFlagBitsTlv;
23 -import org.onosproject.pcepio.types.PcepValueType; 23 +import org.onosproject.pcepio.types.PcepValueType;
24 -import org.onosproject.pcepio.types.TENodeAttributesTlv; 24 +import org.onosproject.pcepio.types.TENodeAttributesTlv;
25 - 25 +
26 -import com.google.common.testing.EqualsTester; 26 +import com.google.common.testing.EqualsTester;
27 - 27 +
28 -/** 28 +/**
29 - * Test case for TE Node Attribute tlv. 29 + * Test case for TE Node Attribute tlv.
30 - */ 30 + */
31 -public class TENodeAttributesTlvTest { 31 +public class TENodeAttributesTlvTest {
32 - 32 +
33 - private final NodeFlagBitsTlv nodeFlagBitsTlv1 = new NodeFlagBitsTlv((byte) 10); 33 + private final NodeFlagBitsTlv nodeFlagBitsTlv1 = new NodeFlagBitsTlv((byte) 10);
34 - private final IPv4TERouterIdOfLocalNodeTlv iPv4TERouterIdOfLocalNodeTlv1 = new 34 + private final IPv4TERouterIdOfLocalNodeTlv iPv4TERouterIdOfLocalNodeTlv1 = new
35 - IPv4TERouterIdOfLocalNodeTlv(0x01010101); 35 + IPv4TERouterIdOfLocalNodeTlv(0x01010101);
36 - 36 +
37 - private final NodeFlagBitsTlv nodeFlagBitsTlv2 = new NodeFlagBitsTlv((byte) 20); 37 + private final NodeFlagBitsTlv nodeFlagBitsTlv2 = new NodeFlagBitsTlv((byte) 20);
38 - private final IPv4TERouterIdOfLocalNodeTlv iPv4TERouterIdOfLocalNodeTlv2 = new 38 + private final IPv4TERouterIdOfLocalNodeTlv iPv4TERouterIdOfLocalNodeTlv2 = new
39 - IPv4TERouterIdOfLocalNodeTlv(0x02020202); 39 + IPv4TERouterIdOfLocalNodeTlv(0x02020202);
40 - 40 +
41 - private final LinkedList<PcepValueType> llNodeAttributesSubTLV1 = new LinkedList<>(); 41 + private final LinkedList<PcepValueType> llNodeAttributesSubTLV1 = new LinkedList<>();
42 - private final boolean a = llNodeAttributesSubTLV1.add(nodeFlagBitsTlv1); 42 + private final boolean a = llNodeAttributesSubTLV1.add(nodeFlagBitsTlv1);
43 - private final boolean b = llNodeAttributesSubTLV1.add(iPv4TERouterIdOfLocalNodeTlv1); 43 + private final boolean b = llNodeAttributesSubTLV1.add(iPv4TERouterIdOfLocalNodeTlv1);
44 - 44 +
45 - private final LinkedList<PcepValueType> llNodeAttributesSubTLV2 = new LinkedList<>(); 45 + private final LinkedList<PcepValueType> llNodeAttributesSubTLV2 = new LinkedList<>();
46 - 46 +
47 - private final boolean c = llNodeAttributesSubTLV2.add(nodeFlagBitsTlv2); 47 + private final boolean c = llNodeAttributesSubTLV2.add(nodeFlagBitsTlv2);
48 - private final boolean d = llNodeAttributesSubTLV2.add(iPv4TERouterIdOfLocalNodeTlv2); 48 + private final boolean d = llNodeAttributesSubTLV2.add(iPv4TERouterIdOfLocalNodeTlv2);
49 - 49 +
50 - private final TENodeAttributesTlv tlv1 = TENodeAttributesTlv.of(llNodeAttributesSubTLV1); 50 + private final TENodeAttributesTlv tlv1 = TENodeAttributesTlv.of(llNodeAttributesSubTLV1);
51 - private final TENodeAttributesTlv sameAsTlv1 = TENodeAttributesTlv.of(llNodeAttributesSubTLV1); 51 + private final TENodeAttributesTlv sameAsTlv1 = TENodeAttributesTlv.of(llNodeAttributesSubTLV1);
52 - private final TENodeAttributesTlv tlv2 = TENodeAttributesTlv.of(llNodeAttributesSubTLV2); 52 + private final TENodeAttributesTlv tlv2 = TENodeAttributesTlv.of(llNodeAttributesSubTLV2);
53 - 53 +
54 - @Test 54 + @Test
55 - public void basics() { 55 + public void basics() {
56 - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); 56 + new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals();
57 - } 57 + }
58 - 58 +
59 -} 59 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.TedCapabilityTlv; 19 +import org.onosproject.pcepio.types.TedCapabilityTlv;
20 - 20 +
21 -import com.google.common.testing.EqualsTester; 21 +import com.google.common.testing.EqualsTester;
22 - 22 +
23 -/** 23 +/**
24 - * Test case for TED Capability tlv. 24 + * Test case for TED Capability tlv.
25 - */ 25 + */
26 -public class TedCapabilityTlvTest { 26 +public class TedCapabilityTlvTest {
27 - 27 +
28 - private final TedCapabilityTlv tlv1 = TedCapabilityTlv.of(1); 28 + private final TedCapabilityTlv tlv1 = TedCapabilityTlv.of(1);
29 - private final TedCapabilityTlv tlv2 = TedCapabilityTlv.of(1); 29 + private final TedCapabilityTlv tlv2 = TedCapabilityTlv.of(1);
30 - private final TedCapabilityTlv tlv3 = TedCapabilityTlv.of(2); 30 + private final TedCapabilityTlv tlv3 = TedCapabilityTlv.of(2);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 34 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
35 - } 35 + }
36 -} 36 +}
......
1 -/* 1 +/*
2 - * Copyright 2015 Open Networking Laboratory 2 + * Copyright 2015 Open Networking Laboratory
3 - * 3 + *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); 4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 - * you may not use this file except in compliance with the License. 5 + * you may not use this file except in compliance with the License.
6 - * You may obtain a copy of the License at 6 + * You may obtain a copy of the License at
7 - * 7 + *
8 - * http://www.apache.org/licenses/LICENSE-2.0 8 + * http://www.apache.org/licenses/LICENSE-2.0
9 - * 9 + *
10 - * Unless required by applicable law or agreed to in writing, software 10 + * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, 11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 - * See the License for the specific language governing permissions and 13 + * See the License for the specific language governing permissions and
14 - * limitations under the License. 14 + * limitations under the License.
15 - */ 15 + */
16 -package org.onosproject.pcepio; 16 +package org.onosproject.pcepio;
17 - 17 +
18 -import org.junit.Test; 18 +import org.junit.Test;
19 -import org.onosproject.pcepio.types.UnreservedBandwidthTlv; 19 +import org.onosproject.pcepio.types.UnreservedBandwidthTlv;
20 -import com.google.common.testing.EqualsTester; 20 +import com.google.common.testing.EqualsTester;
21 - 21 +
22 -/** 22 +/**
23 - * Unit Test case for Unreserved Bandwidth Tlv. 23 + * Unit Test case for Unreserved Bandwidth Tlv.
24 - */ 24 + */
25 -public class UnreservedBandwidthTlvTest { 25 +public class UnreservedBandwidthTlvTest {
26 - 26 +
27 - // Objects of unreserved bandwidth tlv 27 + // Objects of unreserved bandwidth tlv
28 - private final UnreservedBandwidthTlv tlv1 = UnreservedBandwidthTlv.of(100); 28 + private final UnreservedBandwidthTlv tlv1 = UnreservedBandwidthTlv.of(100);
29 - private final UnreservedBandwidthTlv tlv2 = UnreservedBandwidthTlv.of(100); 29 + private final UnreservedBandwidthTlv tlv2 = UnreservedBandwidthTlv.of(100);
30 - private final UnreservedBandwidthTlv tlv3 = UnreservedBandwidthTlv.of(200); 30 + private final UnreservedBandwidthTlv tlv3 = UnreservedBandwidthTlv.of(200);
31 - 31 +
32 - @Test 32 + @Test
33 - public void basics() { 33 + public void basics() {
34 - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); 34 + new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
35 - } 35 + }
36 - 36 +
37 -} 37 +}
......