diff options
Diffstat (limited to 'framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types')
55 files changed, 0 insertions, 2201 deletions
diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/AdministrativeGroupTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/AdministrativeGroupTlvTest.java deleted file mode 100644 index 41e88445..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/AdministrativeGroupTlvTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the AdministrativeGroupTlv. - */ -public class AdministrativeGroupTlvTest { - private final AdministrativeGroupTlv tlv1 = AdministrativeGroupTlv.of(1); - private final AdministrativeGroupTlv sameAsTlv1 = AdministrativeGroupTlv.of(1); - private final AdministrativeGroupTlv tlv2 = AdministrativeGroupTlv.of(2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/AutonomousSystemTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/AutonomousSystemTlvTest.java deleted file mode 100644 index 904a71ef..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/AutonomousSystemTlvTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the AutonomousSystemTlv. - */ -public class AutonomousSystemTlvTest { - private final AutonomousSystemTlv tlv1 = AutonomousSystemTlv.of(1); - private final AutonomousSystemTlv sameAsTlv1 = AutonomousSystemTlv.of(1); - private final AutonomousSystemTlv tlv2 = AutonomousSystemTlv.of(2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/BGPLSidentifierTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/BGPLSidentifierTlvTest.java deleted file mode 100644 index 7ac6cea4..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/BGPLSidentifierTlvTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the BGPLSidentifierTlv. - */ -public class BGPLSidentifierTlvTest { - private final BGPLSidentifierTlv tlv1 = BGPLSidentifierTlv.of(1); - private final BGPLSidentifierTlv sameAsTlv1 = BGPLSidentifierTlv.of(1); - private final BGPLSidentifierTlv tlv2 = BGPLSidentifierTlv.of(2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/GmplsCapabilityTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/GmplsCapabilityTlvTest.java deleted file mode 100644 index 7972712f..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/GmplsCapabilityTlvTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the GmplsCapabilityTlv. - */ -public class GmplsCapabilityTlvTest { - private final GmplsCapabilityTlv tlv1 = GmplsCapabilityTlv.of(1); - private final GmplsCapabilityTlv sameAsTlv1 = GmplsCapabilityTlv.of(1); - private final GmplsCapabilityTlv tlv2 = GmplsCapabilityTlv.of(2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IGPMetricTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IGPMetricTlvTest.java deleted file mode 100644 index 2715a4d7..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IGPMetricTlvTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IGPMetricTlv. - */ -public class IGPMetricTlvTest { - private final byte[] b1 = new byte[] {0x01, 0x02}; - private final byte[] b2 = new byte[] {0x01, 0x03}; - private final IGPMetricTlv tlv1 = IGPMetricTlv.of(b1, (short) 2); - private final IGPMetricTlv sameAsTlv1 = IGPMetricTlv.of(b1, (short) 2); - private final IGPMetricTlv tlv2 = IGPMetricTlv.of(b2, (short) 2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4InterfaceAddressTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4InterfaceAddressTlvTest.java deleted file mode 100644 index eb3a16a8..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4InterfaceAddressTlvTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv4InterfaceAddressTlv. - */ -public class IPv4InterfaceAddressTlvTest { - - private final IPv4InterfaceAddressTlv tlv1 = IPv4InterfaceAddressTlv.of(2); - private final IPv4InterfaceAddressTlv sameAsTlv1 = IPv4InterfaceAddressTlv.of(2); - private final IPv4InterfaceAddressTlv tlv2 = IPv4InterfaceAddressTlv.of(3); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4NeighborAddressTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4NeighborAddressTlvTest.java deleted file mode 100644 index 5f10b4c1..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4NeighborAddressTlvTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv4NeighborAddressTlv. - */ -public class IPv4NeighborAddressTlvTest { - - private final IPv4NeighborAddressTlv tlv1 = IPv4NeighborAddressTlv.of(2); - private final IPv4NeighborAddressTlv sameAsTlv1 = IPv4NeighborAddressTlv.of(2); - private final IPv4NeighborAddressTlv tlv2 = IPv4NeighborAddressTlv.of(3); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4SubObjectTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4SubObjectTest.java deleted file mode 100644 index 10f54015..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4SubObjectTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv4SubObject. - */ -public class IPv4SubObjectTest { - - private final IPv4SubObject subObj1 = IPv4SubObject.of(2, (byte) 16, (byte) 0); - private final IPv4SubObject sameAsSubObj1 = IPv4SubObject.of(2, (byte) 16, (byte) 0); - private final IPv4SubObject subObj2 = IPv4SubObject.of(3, (byte) 16, (byte) 0); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(subObj1, sameAsSubObj1) - .addEqualityGroup(subObj2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4TERouterIdOfLocalNodeTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4TERouterIdOfLocalNodeTlvTest.java deleted file mode 100644 index 3880ca7f..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4TERouterIdOfLocalNodeTlvTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv4TERouterIdOfLocalNodeTlv. - */ -public class IPv4TERouterIdOfLocalNodeTlvTest { - - private final IPv4TERouterIdOfLocalNodeTlv tlv1 = IPv4TERouterIdOfLocalNodeTlv.of(2); - private final IPv4TERouterIdOfLocalNodeTlv sameAsTlv1 = IPv4TERouterIdOfLocalNodeTlv.of(2); - private final IPv4TERouterIdOfLocalNodeTlv tlv2 = IPv4TERouterIdOfLocalNodeTlv.of(3); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4TERouterIdOfRemoteNodeTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4TERouterIdOfRemoteNodeTlvTest.java deleted file mode 100644 index f40ede04..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv4TERouterIdOfRemoteNodeTlvTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv4TERouterIdOfRemoteNodeTlv. - */ -public class IPv4TERouterIdOfRemoteNodeTlvTest { - - private final IPv4TERouterIdOfRemoteNodeTlv tlv1 = IPv4TERouterIdOfRemoteNodeTlv.of(2); - private final IPv4TERouterIdOfRemoteNodeTlv sameAsTlv1 = IPv4TERouterIdOfRemoteNodeTlv.of(2); - private final IPv4TERouterIdOfRemoteNodeTlv tlv2 = IPv4TERouterIdOfRemoteNodeTlv.of(3); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6InterfaceAddressTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6InterfaceAddressTlvTest.java deleted file mode 100644 index 0f8e37c2..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6InterfaceAddressTlvTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv6InterfaceAddressTlv. - */ -public class IPv6InterfaceAddressTlvTest { - - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x01}; - - private final IPv6InterfaceAddressTlv tlv1 = IPv6InterfaceAddressTlv.of(b1); - private final IPv6InterfaceAddressTlv sameAsTlv1 = IPv6InterfaceAddressTlv.of(b1); - private final IPv6InterfaceAddressTlv tlv2 = IPv6InterfaceAddressTlv.of(b2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6NeighborAddressTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6NeighborAddressTlvTest.java deleted file mode 100644 index 57ad7695..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6NeighborAddressTlvTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv6NeighborAddressTlv. - */ -public class IPv6NeighborAddressTlvTest { - - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x01}; - - private final IPv6NeighborAddressTlv tlv1 = IPv6NeighborAddressTlv.of(b1); - private final IPv6NeighborAddressTlv sameAsTlv1 = IPv6NeighborAddressTlv.of(b1); - private final IPv6NeighborAddressTlv tlv2 = IPv6NeighborAddressTlv.of(b2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6SubObjectTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6SubObjectTest.java deleted file mode 100644 index f23b11d8..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6SubObjectTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv6SubObject. - */ -public class IPv6SubObjectTest { - - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; - - private final IPv6SubObject subObj1 = IPv6SubObject.of(b1); - private final IPv6SubObject sameAsSubObj1 = IPv6SubObject.of(b1); - private final IPv6SubObject subObj2 = IPv6SubObject.of(b2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(subObj1, sameAsSubObj1).addEqualityGroup(subObj2).testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlvTest.java deleted file mode 100644 index 6516ed3d..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlvTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv6TERouterIdofLocalNodeTlv. - */ -public class IPv6TERouterIdofLocalNodeTlvTest { - - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; - - private final IPv6TERouterIdofLocalNodeTlv tlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1); - private final IPv6TERouterIdofLocalNodeTlv sameAsTlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1); - private final IPv6TERouterIdofLocalNodeTlv tlv2 = IPv6TERouterIdofLocalNodeTlv.of(b2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlvTest.java deleted file mode 100644 index f3828609..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlvTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the IPv6TERouterIdofRemoteNodeTlv. - */ -public class IPv6TERouterIdofRemoteNodeTlvTest { - - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; - - private final IPv6TERouterIdofRemoteNodeTlv tlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1); - private final IPv6TERouterIdofRemoteNodeTlv sameAsTlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1); - private final IPv6TERouterIdofRemoteNodeTlv tlv2 = IPv6TERouterIdofRemoteNodeTlv.of(b2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/ISISAreaIdentifierTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/ISISAreaIdentifierTlvTest.java deleted file mode 100644 index 17584ac1..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/ISISAreaIdentifierTlvTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the ISISAreaIdentifierTlv. - */ -public class ISISAreaIdentifierTlvTest { - - 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 }; - 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 }; - - private final ISISAreaIdentifierTlv tlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20); - private final ISISAreaIdentifierTlv sameAsTlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20); - private final ISISAreaIdentifierTlv tlv2 = ISISAreaIdentifierTlv.of(b2, (short) 20); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LabelSubObjectTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LabelSubObjectTest.java deleted file mode 100644 index 511d0a20..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LabelSubObjectTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the LabelSubObject. - */ -public class LabelSubObjectTest { - - private final LabelSubObject subObj1 = LabelSubObject.of((byte) 0, (byte) 1, 20); - private final LabelSubObject sameAsSubObj1 = LabelSubObject.of((byte) 0, (byte) 1, 20); - private final LabelSubObject subObj2 = LabelSubObject.of((byte) 0, (byte) 1, 30); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(subObj1, sameAsSubObj1) - .addEqualityGroup(subObj2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LinkLocalRemoteIdentifiersTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LinkLocalRemoteIdentifiersTlvTest.java deleted file mode 100644 index e25bda02..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LinkLocalRemoteIdentifiersTlvTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the LinkLocalRemoteIdentifiersTlv. - */ -public class LinkLocalRemoteIdentifiersTlvTest { - - private final LinkLocalRemoteIdentifiersTlv tlv1 = LinkLocalRemoteIdentifiersTlv.of(10, 20); - private final LinkLocalRemoteIdentifiersTlv sameAsTlv1 = LinkLocalRemoteIdentifiersTlv.of(10, 20); - private final LinkLocalRemoteIdentifiersTlv tlv2 = LinkLocalRemoteIdentifiersTlv.of(20, 30); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LinkNameTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LinkNameTlvTest.java deleted file mode 100644 index 7d9dcb26..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LinkNameTlvTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Equality test for LinkNameTlv. - */ -public class LinkNameTlvTest { - private final byte[] rawValue1 = new byte[] {0x01, 0x00}; - private final byte[] rawValue2 = new byte[] {0x02, 0x00}; - - private final LinkNameTlv tlv1 = new LinkNameTlv(rawValue1, (short) rawValue1.length); - private final LinkNameTlv sameAsTlv1 = LinkNameTlv.of(tlv1.getValue(), tlv1.getLength()); - private final LinkNameTlv tlv2 = new LinkNameTlv(rawValue2, (short) 0); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LinkProtectionTypeTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LinkProtectionTypeTlvTest.java deleted file mode 100644 index 61928f22..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LinkProtectionTypeTlvTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * 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(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlvTest.java deleted file mode 100644 index e8b6abcc..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlvTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -import java.util.LinkedList; - -/** - * 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(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlvTest.java deleted file mode 100644 index 5e79e284..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlvTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the MPLSProtocolMaskTlv. - */ -public class MPLSProtocolMaskTlvTest { - private final byte rawValue1 = 0x0A; - private final byte rawValue2 = 0x0B; - - private final MPLSProtocolMaskTlv tlv1 = new MPLSProtocolMaskTlv(rawValue1); - private final MPLSProtocolMaskTlv sameAsTlv1 = new MPLSProtocolMaskTlv(rawValue1); - private final MPLSProtocolMaskTlv tlv2 = MPLSProtocolMaskTlv.of(rawValue2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MaximumLinkBandwidthTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MaximumLinkBandwidthTlvTest.java deleted file mode 100644 index 4e022b82..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MaximumLinkBandwidthTlvTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the MaximumLinkBandwidthTlv. - */ -public class MaximumLinkBandwidthTlvTest { - private final int rawValue1 = 0x0A; - private final int rawValue2 = 0x0B; - - private final MaximumLinkBandwidthTlv tlv1 = new MaximumLinkBandwidthTlv(rawValue1); - private final MaximumLinkBandwidthTlv sameAsTlv1 = new MaximumLinkBandwidthTlv(rawValue1); - private final MaximumLinkBandwidthTlv tlv2 = MaximumLinkBandwidthTlv.of(rawValue2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MaximumReservableLinkBandwidthTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MaximumReservableLinkBandwidthTlvTest.java deleted file mode 100644 index 7b370359..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MaximumReservableLinkBandwidthTlvTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the MaximumReservableLinkBandwidthTlv. - */ -public class MaximumReservableLinkBandwidthTlvTest { - private final int rawValue1 = 0x0A; - private final int rawValue2 = 0x0B; - - private final MaximumReservableLinkBandwidthTlv tlv1 = new MaximumReservableLinkBandwidthTlv(rawValue1); - private final MaximumReservableLinkBandwidthTlv sameAsTlv1 = new MaximumReservableLinkBandwidthTlv(rawValue1); - private final MaximumReservableLinkBandwidthTlv tlv2 = MaximumReservableLinkBandwidthTlv.of(rawValue2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NexthopIPv4addressTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NexthopIPv4addressTlvTest.java deleted file mode 100644 index 39c699bc..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NexthopIPv4addressTlvTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Equality test for NexthopIPv4addressTlv. - */ -public class NexthopIPv4addressTlvTest { - - private final NexthopIPv4addressTlv tlv1 = new NexthopIPv4addressTlv(0x0A); - private final NexthopIPv4addressTlv sameAsTlv1 = new NexthopIPv4addressTlv(0x0A); - private final NexthopIPv4addressTlv tlv2 = NexthopIPv4addressTlv.of(0x0B); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NexthopIPv6addressTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NexthopIPv6addressTlvTest.java deleted file mode 100644 index 4621336e..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NexthopIPv6addressTlvTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Equality test for NexthopIPv6addressTlv. - */ -public class NexthopIPv6addressTlvTest { - - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00 }; - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; - - private final NexthopIPv6addressTlv tlv1 = NexthopIPv6addressTlv.of(b1); - private final NexthopIPv6addressTlv sameAsTlv1 = NexthopIPv6addressTlv.of(b1); - private final NexthopIPv6addressTlv tlv2 = NexthopIPv6addressTlv.of(b2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NexthopUnnumberedIPv4IDTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NexthopUnnumberedIPv4IDTlvTest.java deleted file mode 100644 index 906c6526..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NexthopUnnumberedIPv4IDTlvTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Equality test for NexthopUnnumberedIPv4IDTlv. - */ -public class NexthopUnnumberedIPv4IDTlvTest { - - private final NexthopUnnumberedIPv4IDTlv tlv1 = new NexthopUnnumberedIPv4IDTlv(0x0A, 0x0A); - private final NexthopUnnumberedIPv4IDTlv sameAsTlv1 = new NexthopUnnumberedIPv4IDTlv(0x0A, 0x0A); - private final NexthopUnnumberedIPv4IDTlv tlv2 = NexthopUnnumberedIPv4IDTlv.of(0x0B, 0x0B); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NodeFlagBitsTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NodeFlagBitsTlvTest.java deleted file mode 100644 index fb90fedb..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NodeFlagBitsTlvTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the NodeFlagBitsTlv. - */ -public class NodeFlagBitsTlvTest { - private final byte rawValue1 = 0x0A; - private final byte rawValue2 = 0x0B; - - private final NodeFlagBitsTlv tlv1 = new NodeFlagBitsTlv(rawValue1); - private final NodeFlagBitsTlv sameAsTlv1 = new NodeFlagBitsTlv(rawValue1); - private final NodeFlagBitsTlv tlv2 = NodeFlagBitsTlv.of(rawValue2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NodeNameTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NodeNameTlvTest.java deleted file mode 100644 index d6d53d6f..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/NodeNameTlvTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the NodeNameTlv. - */ -public class NodeNameTlvTest { - private final byte[] rawValue1 = new byte[] {0x01, 0x02}; - private final byte[] rawValue2 = new byte[] {0x14, 0x15}; - - private final NodeNameTlv tlv1 = new NodeNameTlv(rawValue1, (short) rawValue1.length); - private final NodeNameTlv sameAsTlv1 = NodeNameTlv.of(tlv1.getValue(), tlv1.getLength()); - private final NodeNameTlv tlv2 = new NodeNameTlv(rawValue2, (short) 0); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OSPFareaIDsubTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OSPFareaIDsubTlvTest.java deleted file mode 100644 index 3f741ed6..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OSPFareaIDsubTlvTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the OSPFareaIDsubTlv. - */ -public class OSPFareaIDsubTlvTest { - private final int rawValue1 = 0x0A; - - private final OSPFareaIDsubTlv tlv1 = new OSPFareaIDsubTlv(rawValue1); - private final OSPFareaIDsubTlv tlv2 = OSPFareaIDsubTlv.of(tlv1.getInt()); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OpaqueLinkAttributeTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OpaqueLinkAttributeTlvTest.java deleted file mode 100644 index f437fb57..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OpaqueLinkAttributeTlvTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the OpaqueLinkAttributeTlv. - */ -public class OpaqueLinkAttributeTlvTest { - private final byte[] rawValue1 = new byte[] {0x01, 0x02}; - private final byte[] rawValue2 = new byte[] {0x14, 0x15}; - - private final OpaqueLinkAttributeTlv tlv1 = new OpaqueLinkAttributeTlv(rawValue1, (short) rawValue1.length); - private final OpaqueLinkAttributeTlv sameAsTlv1 = OpaqueLinkAttributeTlv.of(tlv1.getValue(), tlv1.getLength()); - private final OpaqueLinkAttributeTlv tlv2 = new OpaqueLinkAttributeTlv(rawValue2, (short) 0); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PathKeySubObjectTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PathKeySubObjectTest.java deleted file mode 100644 index 64cda54e..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PathKeySubObjectTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the PathKeySubObject. - */ -public class PathKeySubObjectTest { - - private final PathKeySubObject tlv1 = new PathKeySubObject((short) 0x0A, 0x0A); - private final PathKeySubObject sameAsTlv1 = PathKeySubObject.of((short) 0x0A, 0x0A); - private final PathKeySubObject tlv2 = new PathKeySubObject((short) 0x0B, 0x0B); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PathSetupTypeTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PathSetupTypeTlvTest.java deleted file mode 100644 index d82c943e..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PathSetupTypeTlvTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the PathSetupTypeTlv. - */ -public class PathSetupTypeTlvTest { - - private final PathSetupTypeTlv tlv1 = PathSetupTypeTlv.of(0x0A); - private final PathSetupTypeTlv sameAsTlv1 = PathSetupTypeTlv.of(0x0A); - private final PathSetupTypeTlv tlv2 = PathSetupTypeTlv.of(0x0B); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PceccCapabilityTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PceccCapabilityTlvTest.java deleted file mode 100644 index 30892b18..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PceccCapabilityTlvTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test of the PceccCapabilityTlv. - */ -public class PceccCapabilityTlvTest { - private final int rawValue1 = 0x0A; - private final int rawValue2 = 0x0B; - - private final PceccCapabilityTlv tlv1 = new PceccCapabilityTlv(rawValue1); - private final PceccCapabilityTlv sameAsTlv1 = new PceccCapabilityTlv(rawValue1); - private final PceccCapabilityTlv tlv2 = PceccCapabilityTlv.of(rawValue2); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, sameAsTlv1) - .addEqualityGroup(tlv2) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv4AdjacencyTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv4AdjacencyTest.java deleted file mode 100644 index 3ebc9a1e..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv4AdjacencyTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Equality test for PcepNaiIpv4Adjacency. - */ -public class PcepNaiIpv4AdjacencyTest { - - private final PcepNaiIpv4Adjacency obj1 = PcepNaiIpv4Adjacency.of(2, 16); - private final PcepNaiIpv4Adjacency sameAsObj1 = PcepNaiIpv4Adjacency.of(2, 16); - private final PcepNaiIpv4Adjacency obj2 = PcepNaiIpv4Adjacency.of(3, 16); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(obj1, sameAsObj1).addEqualityGroup(obj2).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv4NodeIdTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv4NodeIdTest.java deleted file mode 100644 index 5ea5edd6..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv4NodeIdTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -public class PcepNaiIpv4NodeIdTest { - - private final PcepNaiIpv4NodeId tlv1 = PcepNaiIpv4NodeId.of(1); - private final PcepNaiIpv4NodeId tlv2 = PcepNaiIpv4NodeId.of(1); - private final PcepNaiIpv4NodeId tlv3 = PcepNaiIpv4NodeId.of(3); - - @Test - public void basics() { - new EqualsTester() - .addEqualityGroup(tlv1, tlv2) - .addEqualityGroup(tlv3) - .testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv6AdjacencyTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv6AdjacencyTest.java deleted file mode 100644 index 52c40f94..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv6AdjacencyTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -public class PcepNaiIpv6AdjacencyTest { - private final byte[] localIpv6Addr1 = {(byte) 0x01010101 }; - private final byte[] remoteIpv6Addr1 = {(byte) 0x02020202 }; - private final byte[] localIpv6Addr2 = {(byte) 0x01010101 }; - private final byte[] remoteIpv6Addr2 = {(byte) 0x02020202 }; - private final byte[] localIpv6Addr3 = {(byte) 0x05050505 }; - private final byte[] remoteIpv6Addr3 = {(byte) 0x06060606 }; - - private final PcepNaiIpv6Adjacency tlv1 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1); - private final PcepNaiIpv6Adjacency tlv2 = PcepNaiIpv6Adjacency.of(localIpv6Addr1, remoteIpv6Addr1); - private final PcepNaiIpv6Adjacency tlv3 = PcepNaiIpv6Adjacency.of(localIpv6Addr3, remoteIpv6Addr3); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv6NodeIdTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv6NodeIdTest.java deleted file mode 100644 index 29771a0f..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiIpv6NodeIdTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Equality test for PcepNaiIpv6NodeId. - */ -public class PcepNaiIpv6NodeIdTest { - - private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, - 0x00, 0x00 }; - private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, - 0x00, 0x00 }; - - private final PcepNaiIpv6NodeId tlv1 = PcepNaiIpv6NodeId.of(b1); - private final PcepNaiIpv6NodeId sameAsTlv1 = PcepNaiIpv6NodeId.of(b1); - private final PcepNaiIpv6NodeId tlv2 = PcepNaiIpv6NodeId.of(b2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiUnnumberedAdjacencyIpv4Test.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiUnnumberedAdjacencyIpv4Test.java deleted file mode 100644 index 60ae22fd..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/PcepNaiUnnumberedAdjacencyIpv4Test.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -public class PcepNaiUnnumberedAdjacencyIpv4Test { - - private final int localNodeId1 = 1; - private final int localInterfaceId1 = 1; - private final int remoteNodeId1 = 1; - private final int remoteInterfaceId1 = 1; - private final PcepNaiUnnumberedAdjacencyIpv4 tlv1 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId1, - localInterfaceId1, remoteNodeId1, remoteInterfaceId1); - - private final int localNodeId2 = 1; - private final int localInterfaceId2 = 1; - private final int remoteNodeId2 = 1; - private final int remoteInterfaceId2 = 1; - private final PcepNaiUnnumberedAdjacencyIpv4 tlv2 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId2, - localInterfaceId2, remoteNodeId2, remoteInterfaceId2); - - private final int localNodeId3 = 2; - private final int localInterfaceId3 = 2; - private final int remoteNodeId3 = 2; - private final int remoteInterfaceId3 = 2; - - private final PcepNaiUnnumberedAdjacencyIpv4 tlv3 = PcepNaiUnnumberedAdjacencyIpv4.of(localNodeId3, - localInterfaceId3, remoteNodeId3, remoteInterfaceId3); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlvTest.java deleted file mode 100644 index 112e4a4e..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlvTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -import java.util.LinkedList; - -/** - * Test case for Remote TE Node Descriptors tlv. - */ -public class RemoteTENodeDescriptorsTlvTest { - - private final AutonomousSystemTlv autonomousSystemTlv1 = new AutonomousSystemTlv(10); - private final BGPLSidentifierTlv bGPLSidentifierTlv1 = new BGPLSidentifierTlv(20); - - private final AutonomousSystemTlv autonomousSystemTlv2 = new AutonomousSystemTlv(20); - private final BGPLSidentifierTlv bGPLSidentifierTlv2 = new BGPLSidentifierTlv(30); - - private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV1 = new LinkedList<>(); - private final boolean a = llRemoteTENodeDescriptorSubTLV1.add(autonomousSystemTlv1); - private final boolean b = llRemoteTENodeDescriptorSubTLV1.add(bGPLSidentifierTlv1); - - private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV2 = new LinkedList<>(); - private final boolean c = llRemoteTENodeDescriptorSubTLV2.add(autonomousSystemTlv2); - private final boolean d = llRemoteTENodeDescriptorSubTLV2.add(bGPLSidentifierTlv2); - - private final RemoteTENodeDescriptorsTlv tlv1 = RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV1); - private final RemoteTENodeDescriptorsTlv sameAsTlv1 = - RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV1); - private final RemoteTENodeDescriptorsTlv tlv2 = RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RouterIDSubTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RouterIDSubTlvTest.java deleted file mode 100644 index 2f9e18a9..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RouterIDSubTlvTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test case for Router ID Sub tlv. - */ -public class RouterIDSubTlvTest { - - private final byte[] value1 = {1, 2 }; - private final Short length1 = 2; - private final RouterIDSubTlv tlv1 = RouterIDSubTlv.of(value1, length1); - - private final Short length2 = 2; - private final RouterIDSubTlv tlv2 = RouterIDSubTlv.of(value1, length2); - - private final byte[] value3 = {1, 2, 3 }; - private final Short length3 = 3; - private final RouterIDSubTlv tlv3 = RouterIDSubTlv.of(value3, length3); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RoutingUniverseTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RoutingUniverseTlvTest.java deleted file mode 100644 index 18aa2851..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RoutingUniverseTlvTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Equality test for RoutingUniverseTlv. - */ -public class RoutingUniverseTlvTest { - - private final RoutingUniverseTlv tlv1 = RoutingUniverseTlv.of(2); - private final RoutingUniverseTlv tlv2 = RoutingUniverseTlv.of(2); - private final RoutingUniverseTlv tlv3 = RoutingUniverseTlv.of(3); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/SharedRiskLinkGroupTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/SharedRiskLinkGroupTlvTest.java deleted file mode 100644 index 7c8ec570..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/SharedRiskLinkGroupTlvTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test case for Shared Risk Link Group tlv. - */ -public class SharedRiskLinkGroupTlvTest { - - private final int[] raw = {1 }; - private final Short hLength = 2; - private final SharedRiskLinkGroupTlv tlv1 = SharedRiskLinkGroupTlv.of(raw, hLength); - - private final SharedRiskLinkGroupTlv sameAsTlv1 = SharedRiskLinkGroupTlv.of(raw, hLength); - - private final int[] raw2 = {2 }; - private final Short hLength2 = 3; - private final SharedRiskLinkGroupTlv tlv2 = SharedRiskLinkGroupTlv.of(raw2, hLength2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/SrEroSubObjectTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/SrEroSubObjectTest.java deleted file mode 100644 index d91569b9..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/SrEroSubObjectTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; -import org.onosproject.pcepio.protocol.PcepNai; - -public class SrEroSubObjectTest { - - private final boolean bFFlag = false; - private final boolean bSFlag = false; - private final boolean bCFlag = false; - private final boolean bMFlag = false; - private final byte st = 1; - private final int sID = 1; - private final PcepNai nai = null; - - private final SrEroSubObject tlv1 = SrEroSubObject.of(st, bFFlag, bSFlag, bCFlag, bMFlag, sID, nai); - - private final boolean bFFlag1 = false; - private final boolean bSFlag1 = false; - private final boolean bCFlag1 = false; - private final boolean bMFlag1 = false; - private final byte st1 = 1; - private final int sID1 = 1; - private final PcepNai nai1 = null; - - private final SrEroSubObject tlv2 = SrEroSubObject.of(st1, bFFlag1, bSFlag1, bCFlag1, bMFlag1, sID1, nai1); - - private final boolean bFFlag2 = true; - private final boolean bSFlag2 = true; - private final boolean bCFlag2 = true; - private final boolean bMFlag2 = true; - private final byte st2 = 2; - private final int sID2 = 2; - private final PcepNai nai2 = null; - - private final SrEroSubObject tlv3 = SrEroSubObject.of(st2, bFFlag2, bSFlag2, bCFlag2, bMFlag2, sID2, nai2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulIPv4LspIdentidiersTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulIPv4LspIdentidiersTlvTest.java deleted file mode 100644 index d1798fa3..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulIPv4LspIdentidiersTlvTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -public class StatefulIPv4LspIdentidiersTlvTest { - - private final int ipv4IngressAddress = 1; - private final short lspId = 1; - private final short tunnelId = 1; - private final int extendedTunnelId = 1; - private final int ipv4EgressAddress = 1; - - private final StatefulIPv4LspIdentidiersTlv tlv1 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress, lspId, - tunnelId, extendedTunnelId, ipv4EgressAddress); - - private final int ipv4IngressAddress1 = 1; - private final short lspId1 = 1; - private final short tunnelId1 = 1; - private final int extendedTunnelId1 = 1; - private final int ipv4EgressAddress1 = 1; - - private final StatefulIPv4LspIdentidiersTlv tlv2 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress1, lspId1, - tunnelId1, extendedTunnelId1, ipv4EgressAddress1); - - private final int ipv4IngressAddress2 = 2; - private final short lspId2 = 2; - private final short tunnelId2 = 2; - private final int extendedTunnelId2 = 2; - private final int ipv4EgressAddress2 = 2; - - private final StatefulIPv4LspIdentidiersTlv tlv3 = StatefulIPv4LspIdentidiersTlv.of(ipv4IngressAddress2, lspId2, - tunnelId2, extendedTunnelId2, ipv4EgressAddress2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulLspDbVerTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulLspDbVerTlvTest.java deleted file mode 100644 index 7076bc9e..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulLspDbVerTlvTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test case for Stateful Lsp Db Ver tlv. - */ -public class StatefulLspDbVerTlvTest { - - private final StatefulLspDbVerTlv tlv1 = StatefulLspDbVerTlv.of(1); - private final StatefulLspDbVerTlv tlv2 = StatefulLspDbVerTlv.of(1); - private final StatefulLspDbVerTlv tlv3 = StatefulLspDbVerTlv.of(2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulLspErrorCodeTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulLspErrorCodeTlvTest.java deleted file mode 100644 index 039108ae..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulLspErrorCodeTlvTest.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -public class StatefulLspErrorCodeTlvTest { - - private final StatefulLspErrorCodeTlv tlv1 = StatefulLspErrorCodeTlv.of(1); - private final StatefulLspErrorCodeTlv tlv2 = StatefulLspErrorCodeTlv.of(1); - private final StatefulLspErrorCodeTlv tlv3 = StatefulLspErrorCodeTlv.of(2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulPceCapabilityTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulPceCapabilityTlvTest.java deleted file mode 100644 index 8637024c..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/StatefulPceCapabilityTlvTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test case for Stateful Pce Capability tlv. - */ -public class StatefulPceCapabilityTlvTest { - - private final StatefulPceCapabilityTlv tlv1 = StatefulPceCapabilityTlv.of(1); - private final StatefulPceCapabilityTlv tlv2 = StatefulPceCapabilityTlv.of(1); - private final StatefulPceCapabilityTlv tlv3 = StatefulPceCapabilityTlv.of(2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/SymbolicPathNameTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/SymbolicPathNameTlvTest.java deleted file mode 100644 index 8d458f4e..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/SymbolicPathNameTlvTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test case for Symbolic path tlv. - */ -public class SymbolicPathNameTlvTest { - - private final byte[] value1 = {0x41 }; - private final Short length1 = 2; - private final SymbolicPathNameTlv tlv1 = SymbolicPathNameTlv.of(value1, length1); - - private final byte[] value2 = {0x41 }; - private final Short length2 = 2; - private final SymbolicPathNameTlv tlv2 = SymbolicPathNameTlv.of(value1, length2); - - private final byte[] value3 = {0x41, 0x43 }; - private final Short length3 = 3; - private final SymbolicPathNameTlv tlv3 = SymbolicPathNameTlv.of(value3, length3); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TEDefaultMetricTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TEDefaultMetricTlvTest.java deleted file mode 100644 index c46b0af1..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TEDefaultMetricTlvTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test case for TE Default Metric tlv. - */ -public class TEDefaultMetricTlvTest { - - private final TEDefaultMetricTlv tlv1 = TEDefaultMetricTlv.of(1); - private final TEDefaultMetricTlv tlv2 = TEDefaultMetricTlv.of(1); - private final TEDefaultMetricTlv tlv3 = TEDefaultMetricTlv.of(2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TELinkAttributesTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TELinkAttributesTlvTest.java deleted file mode 100644 index 8504a87c..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TELinkAttributesTlvTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -import java.util.LinkedList; - -/** - * Test case for TE Link Attribute Tlv. - */ -public class TELinkAttributesTlvTest { - - private final AdministrativeGroupTlv administrativeGroupTlv1 = new AdministrativeGroupTlv(10); - private final MaximumReservableLinkBandwidthTlv maximumReservableLinkBandwidthTlv1 = - new MaximumReservableLinkBandwidthTlv(20); - - private final AdministrativeGroupTlv administrativeGroupTlv2 = new AdministrativeGroupTlv(20); - private final MaximumReservableLinkBandwidthTlv maximumReservableLinkBandwidthTlv2 = - new MaximumReservableLinkBandwidthTlv(30); - - private final LinkedList<PcepValueType> llLinkAttributesSubTLV1 = new LinkedList<>(); - private final boolean a = llLinkAttributesSubTLV1.add(administrativeGroupTlv1); - private final boolean b = llLinkAttributesSubTLV1.add(maximumReservableLinkBandwidthTlv1); - - private final LinkedList<PcepValueType> llLinkAttributesSubTLV2 = new LinkedList<>(); - - private final boolean c = llLinkAttributesSubTLV2.add(administrativeGroupTlv2); - private final boolean d = llLinkAttributesSubTLV2.add(maximumReservableLinkBandwidthTlv2); - - private final TELinkAttributesTlv tlv1 = TELinkAttributesTlv.of(llLinkAttributesSubTLV1); - private final TELinkAttributesTlv sameAsTlv1 = TELinkAttributesTlv.of(llLinkAttributesSubTLV1); - private final TELinkAttributesTlv tlv2 = TELinkAttributesTlv.of(llLinkAttributesSubTLV2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TELinkDescriptorsTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TELinkDescriptorsTlvTest.java deleted file mode 100644 index 4e942097..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TELinkDescriptorsTlvTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -import java.util.LinkedList; - -/** - * Test case for TE link descriptors Tlv. - */ -public class TELinkDescriptorsTlvTest { - private final LinkLocalRemoteIdentifiersTlv linkLocalRemoteIdentifiersTlv1 = new - LinkLocalRemoteIdentifiersTlv(10, 10); - private final IPv4InterfaceAddressTlv iPv4InterfaceAddressTlv1 = new IPv4InterfaceAddressTlv(0x01010101); - - private final LinkLocalRemoteIdentifiersTlv linkLocalRemoteIdentifiersTlv2 = new - LinkLocalRemoteIdentifiersTlv(20, 20); - private final IPv4InterfaceAddressTlv iPv4InterfaceAddressTlv2 = new IPv4InterfaceAddressTlv(0x02020202); - - private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs1 = new LinkedList<>(); - private final boolean a = llLinkDescriptorsSubTLVs1.add(linkLocalRemoteIdentifiersTlv1); - private final boolean b = llLinkDescriptorsSubTLVs1.add(iPv4InterfaceAddressTlv1); - - private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs2 = new LinkedList<>(); - private final boolean c = llLinkDescriptorsSubTLVs2.add(linkLocalRemoteIdentifiersTlv2); - private final boolean d = llLinkDescriptorsSubTLVs2.add(iPv4InterfaceAddressTlv2); - - private final TELinkDescriptorsTlv tlv1 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs1); - private final TELinkDescriptorsTlv sameAstlv1 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs1); - private final TELinkDescriptorsTlv tlv2 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, sameAstlv1).addEqualityGroup(tlv2).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TENodeAttributesTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TENodeAttributesTlvTest.java deleted file mode 100644 index 28cf27d4..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TENodeAttributesTlvTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -import java.util.LinkedList; - -/** - * Test case for TE Node Attribute tlv. - */ -public class TENodeAttributesTlvTest { - - private final NodeFlagBitsTlv nodeFlagBitsTlv1 = new NodeFlagBitsTlv((byte) 10); - private final IPv4TERouterIdOfLocalNodeTlv iPv4TERouterIdOfLocalNodeTlv1 = new - IPv4TERouterIdOfLocalNodeTlv(0x01010101); - - private final NodeFlagBitsTlv nodeFlagBitsTlv2 = new NodeFlagBitsTlv((byte) 20); - private final IPv4TERouterIdOfLocalNodeTlv iPv4TERouterIdOfLocalNodeTlv2 = new - IPv4TERouterIdOfLocalNodeTlv(0x02020202); - - private final LinkedList<PcepValueType> llNodeAttributesSubTLV1 = new LinkedList<>(); - private final boolean a = llNodeAttributesSubTLV1.add(nodeFlagBitsTlv1); - private final boolean b = llNodeAttributesSubTLV1.add(iPv4TERouterIdOfLocalNodeTlv1); - - private final LinkedList<PcepValueType> llNodeAttributesSubTLV2 = new LinkedList<>(); - - private final boolean c = llNodeAttributesSubTLV2.add(nodeFlagBitsTlv2); - private final boolean d = llNodeAttributesSubTLV2.add(iPv4TERouterIdOfLocalNodeTlv2); - - private final TENodeAttributesTlv tlv1 = TENodeAttributesTlv.of(llNodeAttributesSubTLV1); - private final TENodeAttributesTlv sameAsTlv1 = TENodeAttributesTlv.of(llNodeAttributesSubTLV1); - private final TENodeAttributesTlv tlv2 = TENodeAttributesTlv.of(llNodeAttributesSubTLV2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals(); - } - -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TedCapabilityTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TedCapabilityTlvTest.java deleted file mode 100644 index 18677ca3..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/TedCapabilityTlvTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Test case for TED Capability tlv. - */ -public class TedCapabilityTlvTest { - - private final TedCapabilityTlv tlv1 = TedCapabilityTlv.of(1); - private final TedCapabilityTlv tlv2 = TedCapabilityTlv.of(1); - private final TedCapabilityTlv tlv3 = TedCapabilityTlv.of(2); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } -} diff --git a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/UnreservedBandwidthTlvTest.java b/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/UnreservedBandwidthTlvTest.java deleted file mode 100644 index a50fd9f4..00000000 --- a/framework/src/onos/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/UnreservedBandwidthTlvTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.types; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; - -/** - * Unit Test case for Unreserved Bandwidth Tlv. - */ -public class UnreservedBandwidthTlvTest { - - // Objects of unreserved bandwidth tlv - private final UnreservedBandwidthTlv tlv1 = UnreservedBandwidthTlv.of(100); - private final UnreservedBandwidthTlv tlv2 = UnreservedBandwidthTlv.of(100); - private final UnreservedBandwidthTlv tlv3 = UnreservedBandwidthTlv.of(200); - - @Test - public void basics() { - new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals(); - } - -} |