Sho SHIMIZU
Committed by Brian O'Connor

Use LF as line separator

Change-Id: I8ce85c95939365118d6dd3320ef8a36f89c4a1e5
Showing 55 changed files with 2219 additions and 2124 deletions
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.AdministrativeGroupTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.AdministrativeGroupTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.AutonomousSystemTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.AutonomousSystemTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.BGPLSidentifierTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.BGPLSidentifierTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.GmplsCapabilityTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.GmplsCapabilityTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IGPMetricTlv;
/**
* Test of the IGPMetricTlv.
*/
public class IGPMetricTlvTest {
private final byte[] b1 = new byte[] {0x01, 0x02};
private final byte[] b2 = new byte[] {0x01, 0x02};
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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IGPMetricTlv;
/**
* Test of the IGPMetricTlv.
*/
public class IGPMetricTlvTest {
private final byte[] b1 = new byte[] {0x01, 0x02};
private final byte[] b2 = new byte[] {0x01, 0x02};
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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4NeighborAddressTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4NeighborAddressTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4SubObject;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4SubObject;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4TERouterIdOfLocalNodeTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4TERouterIdOfLocalNodeTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4TERouterIdOfRemoteNodeTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4TERouterIdOfRemoteNodeTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6InterfaceAddressTlv;
/**
* 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
(byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 };
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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6InterfaceAddressTlv;
/**
* 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
(byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 };
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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6NeighborAddressTlv;
/**
* 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, 0x00 };
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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6NeighborAddressTlv;
/**
* 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, 0x00 };
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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6SubObject;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6SubObject;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6TERouterIdofLocalNodeTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6TERouterIdofLocalNodeTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6TERouterIdofRemoteNodeTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv6TERouterIdofRemoteNodeTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.ISISAreaIdentifierTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.ISISAreaIdentifierTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.LabelSubObject;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.LabelSubObject;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.LinkNameTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.LinkNameTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/* * Copyright 2015 Open Networking Laboratory * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.onosproject.pcepio; import org.junit.Test;import org.onosproject.pcepio.types.LinkProtectionTypeTlv; import com.google.common.testing.EqualsTester; /** * Test of the LinkProtectionTypeTlv. */public class LinkProtectionTypeTlvTest { private final byte rawValue1 = 0x0A; private final byte rawValue2 = 0x0B; private final LinkProtectionTypeTlv tlv1 = new LinkProtectionTypeTlv(rawValue1); private final LinkProtectionTypeTlv sameAsTlv1 = new LinkProtectionTypeTlv(rawValue1); private final LinkProtectionTypeTlv tlv2 = new LinkProtectionTypeTlv(rawValue2, (byte) 0); @Test public void basics() { new EqualsTester() .addEqualityGroup(tlv1, sameAsTlv1) .addEqualityGroup(tlv2) .testEquals(); }}
\ No newline at end of file
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.LinkProtectionTypeTlv;
import com.google.common.testing.EqualsTester;
/**
* Test of the LinkProtectionTypeTlv.
*/
public class LinkProtectionTypeTlvTest {
private final byte rawValue1 = 0x0A;
private final byte rawValue2 = 0x0B;
private final LinkProtectionTypeTlv tlv1 = new LinkProtectionTypeTlv(rawValue1);
private final LinkProtectionTypeTlv sameAsTlv1 = new LinkProtectionTypeTlv(rawValue1);
private final LinkProtectionTypeTlv tlv2 = new LinkProtectionTypeTlv(rawValue2, (byte) 0);
@Test
public void basics() {
new EqualsTester()
.addEqualityGroup(tlv1, sameAsTlv1)
.addEqualityGroup(tlv2)
.testEquals();
}
}
......
/* * Copyright 2015 Open Networking Laboratory * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.onosproject.pcepio; import com.google.common.testing.EqualsTester; import org.junit.Test; import java.util.LinkedList; import org.onosproject.pcepio.types.LocalTENodeDescriptorsTlv;import org.onosproject.pcepio.types.AutonomousSystemTlv;import org.onosproject.pcepio.types.BGPLSidentifierTlv;import org.onosproject.pcepio.types.PcepValueType; /** * Test of the LocalTENodeDescriptorsTlv. */public class LocalTENodeDescriptorsTlvTest { private final AutonomousSystemTlv baAutoSysTlvRawValue1 = new AutonomousSystemTlv(1); private final BGPLSidentifierTlv baBgplsIdRawValue1 = new BGPLSidentifierTlv(1); private final AutonomousSystemTlv baAutoSysTlvRawValue2 = new AutonomousSystemTlv(2); private final BGPLSidentifierTlv baBgplsIdRawValue2 = new BGPLSidentifierTlv(2); private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs1 = new LinkedList<PcepValueType>(); private final boolean a = llNodeDescriptorSubTLVs1.add(baAutoSysTlvRawValue1); private final boolean b = llNodeDescriptorSubTLVs1.add(baBgplsIdRawValue1); private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs2 = new LinkedList<PcepValueType>(); private final boolean c = llNodeDescriptorSubTLVs2.add(baAutoSysTlvRawValue2); private final boolean d = llNodeDescriptorSubTLVs2.add(baBgplsIdRawValue2); private final LocalTENodeDescriptorsTlv tlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1); private final LocalTENodeDescriptorsTlv sameAstlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1); private final LocalTENodeDescriptorsTlv tlv2 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs2); @Test public void basics() { new EqualsTester().addEqualityGroup(tlv1, sameAstlv1).addEqualityGroup(tlv2).testEquals(); }}
\ No newline at end of file
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import java.util.LinkedList;
import org.onosproject.pcepio.types.LocalTENodeDescriptorsTlv;
import org.onosproject.pcepio.types.AutonomousSystemTlv;
import org.onosproject.pcepio.types.BGPLSidentifierTlv;
import org.onosproject.pcepio.types.PcepValueType;
/**
* Test of the LocalTENodeDescriptorsTlv.
*/
public class LocalTENodeDescriptorsTlvTest {
private final AutonomousSystemTlv baAutoSysTlvRawValue1 = new AutonomousSystemTlv(1);
private final BGPLSidentifierTlv baBgplsIdRawValue1 = new BGPLSidentifierTlv(1);
private final AutonomousSystemTlv baAutoSysTlvRawValue2 = new AutonomousSystemTlv(2);
private final BGPLSidentifierTlv baBgplsIdRawValue2 = new BGPLSidentifierTlv(2);
private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs1 = new LinkedList<PcepValueType>();
private final boolean a = llNodeDescriptorSubTLVs1.add(baAutoSysTlvRawValue1);
private final boolean b = llNodeDescriptorSubTLVs1.add(baBgplsIdRawValue1);
private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs2 = new LinkedList<PcepValueType>();
private final boolean c = llNodeDescriptorSubTLVs2.add(baAutoSysTlvRawValue2);
private final boolean d = llNodeDescriptorSubTLVs2.add(baBgplsIdRawValue2);
private final LocalTENodeDescriptorsTlv tlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1);
private final LocalTENodeDescriptorsTlv sameAstlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1);
private final LocalTENodeDescriptorsTlv tlv2 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs2);
@Test
public void basics() {
new EqualsTester().addEqualityGroup(tlv1, sameAstlv1).addEqualityGroup(tlv2).testEquals();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.MPLSProtocolMaskTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.MPLSProtocolMaskTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.MaximumLinkBandwidthTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.MaximumLinkBandwidthTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.MaximumReservableLinkBandwidthTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.MaximumReservableLinkBandwidthTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.NexthopIPv4addressTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.NexthopIPv4addressTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.NexthopUnnumberedIPv4IDTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.NexthopUnnumberedIPv4IDTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.NodeFlagBitsTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.NodeFlagBitsTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.NodeNameTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.NodeNameTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.OSPFareaIDsubTlv;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import org.onosproject.pcepio.types.OSPFareaIDsubTlv;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.OpaqueLinkAttributeTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.OpaqueLinkAttributeTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PathKeySubObject;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PathKeySubObject;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PathSetupTypeTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PathSetupTypeTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PceccCapabilityTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PceccCapabilityTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2014-2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.onosproject.pcepio.exceptions.PcepParseException;
import org.onosproject.pcepio.protocol.PcepCloseMsg;
import org.onosproject.pcepio.protocol.PcepFactories;
import org.onosproject.pcepio.protocol.PcepMessage;
import org.onosproject.pcepio.protocol.PcepMessageReader;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsSame.sameInstance;
public class PcepCloseMsgTest {
/**
* Common header, reason to close.
*/
@Test
public void closeMessageTest1() throws PcepParseException {
byte[] closeMsg = new byte[] {0x20, 0x07, 0x00, 0x0C, 0x0f, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02 };
byte[] testCloseMsg = {0 };
ChannelBuffer buffer = ChannelBuffers.dynamicBuffer();
buffer.writeBytes(closeMsg);
PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader();
PcepMessage message;
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepCloseMsg) message));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testCloseMsg = buf.array();
int readLen = buf.writerIndex();
testCloseMsg = new byte[readLen];
buf.readBytes(testCloseMsg, 0, readLen);
assertThat(testCloseMsg, is(closeMsg));
}
}
/*
* Copyright 2014-2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.onosproject.pcepio.exceptions.PcepParseException;
import org.onosproject.pcepio.protocol.PcepCloseMsg;
import org.onosproject.pcepio.protocol.PcepFactories;
import org.onosproject.pcepio.protocol.PcepMessage;
import org.onosproject.pcepio.protocol.PcepMessageReader;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsSame.sameInstance;
public class PcepCloseMsgTest {
/**
* Common header, reason to close.
*/
@Test
public void closeMessageTest1() throws PcepParseException {
byte[] closeMsg = new byte[] {0x20, 0x07, 0x00, 0x0C, 0x0f, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02 };
byte[] testCloseMsg = {0 };
ChannelBuffer buffer = ChannelBuffers.dynamicBuffer();
buffer.writeBytes(closeMsg);
PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader();
PcepMessage message;
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepCloseMsg) message));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testCloseMsg = buf.array();
int readLen = buf.writerIndex();
testCloseMsg = new byte[readLen];
buf.readBytes(testCloseMsg, 0, readLen);
assertThat(testCloseMsg, is(closeMsg));
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PcepNaiIpv4NodeId;
import com.google.common.testing.EqualsTester;
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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PcepNaiIpv4NodeId;
import com.google.common.testing.EqualsTester;
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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PcepNaiIpv6Adjacency;
import com.google.common.testing.EqualsTester;
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();
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PcepNaiIpv6Adjacency;
import com.google.common.testing.EqualsTester;
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();
}
}
\ No newline at end of file
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PcepNaiUnnumberedAdjacencyIpv4;
import com.google.common.testing.EqualsTester;
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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.PcepNaiUnnumberedAdjacencyIpv4;
import com.google.common.testing.EqualsTester;
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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import java.util.LinkedList;
import org.junit.Test;
import org.onosproject.pcepio.types.AutonomousSystemTlv;
import org.onosproject.pcepio.types.BGPLSidentifierTlv;
import org.onosproject.pcepio.types.PcepValueType;
import org.onosproject.pcepio.types.RemoteTENodeDescriptorsTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import java.util.LinkedList;
import org.junit.Test;
import org.onosproject.pcepio.types.AutonomousSystemTlv;
import org.onosproject.pcepio.types.BGPLSidentifierTlv;
import org.onosproject.pcepio.types.PcepValueType;
import org.onosproject.pcepio.types.RemoteTENodeDescriptorsTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.RouterIDSubTlv;
import com.google.common.testing.EqualsTester;
/**
* Test case for Router ID Sub tlv.
*/
public class RouterIDSubTlvTest {
private final byte[] value1 = {1, 2 };
private final Short length1 = new Short((short) 2);
private final RouterIDSubTlv tlv1 = RouterIDSubTlv.of(value1, length1);
private final Short length2 = new Short((short) 2);
private final RouterIDSubTlv tlv2 = RouterIDSubTlv.of(value1, length2);
private final byte[] value3 = {1, 2, 3 };
private final Short length3 = new Short((short) 3);
private final RouterIDSubTlv tlv3 = RouterIDSubTlv.of(value3, length3);
@Test
public void basics() {
new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.RouterIDSubTlv;
import com.google.common.testing.EqualsTester;
/**
* Test case for Router ID Sub tlv.
*/
public class RouterIDSubTlvTest {
private final byte[] value1 = {1, 2 };
private final Short length1 = new Short((short) 2);
private final RouterIDSubTlv tlv1 = RouterIDSubTlv.of(value1, length1);
private final Short length2 = new Short((short) 2);
private final RouterIDSubTlv tlv2 = RouterIDSubTlv.of(value1, length2);
private final byte[] value3 = {1, 2, 3 };
private final Short length3 = new Short((short) 3);
private final RouterIDSubTlv tlv3 = RouterIDSubTlv.of(value3, length3);
@Test
public void basics() {
new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.SharedRiskLinkGroupTlv;
import com.google.common.testing.EqualsTester;
/**
* Test case for Shared Risk Link Group tlv.
*/
public class SharedRiskLinkGroupTlvTest {
private final int[] raw = {1 };
private final Short hLength = new Short((short) 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 = new Short((short) 3);
private final SharedRiskLinkGroupTlv tlv2 = SharedRiskLinkGroupTlv.of(raw2, hLength2);
@Test
public void basics() {
new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.SharedRiskLinkGroupTlv;
import com.google.common.testing.EqualsTester;
/**
* Test case for Shared Risk Link Group tlv.
*/
public class SharedRiskLinkGroupTlvTest {
private final int[] raw = {1 };
private final Short hLength = new Short((short) 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 = new Short((short) 3);
private final SharedRiskLinkGroupTlv tlv2 = SharedRiskLinkGroupTlv.of(raw2, hLength2);
@Test
public void basics() {
new EqualsTester().addEqualityGroup(tlv1, sameAsTlv1).addEqualityGroup(tlv2).testEquals();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.protocol.PcepNai;
import org.onosproject.pcepio.types.SrEroSubObject;
import com.google.common.testing.EqualsTester;
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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.protocol.PcepNai;
import org.onosproject.pcepio.types.SrEroSubObject;
import com.google.common.testing.EqualsTester;
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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.StatefulIPv4LspIdentidiersTlv;
import com.google.common.testing.EqualsTester;
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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.StatefulIPv4LspIdentidiersTlv;
import com.google.common.testing.EqualsTester;
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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.StatefulLspDbVerTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.StatefulLspDbVerTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.StatefulLspErrorCodeTlv;
import com.google.common.testing.EqualsTester;
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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.StatefulLspErrorCodeTlv;
import com.google.common.testing.EqualsTester;
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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.StatefulPceCapabilityTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.StatefulPceCapabilityTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.SymbolicPathNameTlv;
import com.google.common.testing.EqualsTester;
/**
* Test case for Symbolic path tlv.
*/
public class SymbolicPathNameTlvTest {
private final byte[] value1 = {0x41 };
private final Short length1 = new Short((short) 2);
private final SymbolicPathNameTlv tlv1 = SymbolicPathNameTlv.of(value1, length1);
private final byte[] value2 = {0x41 };
private final Short length2 = new Short((short) 2);
private final SymbolicPathNameTlv tlv2 = SymbolicPathNameTlv.of(value1, length2);
private final byte[] value3 = {0x41, 0x43 };
private final Short length3 = new Short((short) 3);
private final SymbolicPathNameTlv tlv3 = SymbolicPathNameTlv.of(value3, length3);
@Test
public void basics() {
new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.SymbolicPathNameTlv;
import com.google.common.testing.EqualsTester;
/**
* Test case for Symbolic path tlv.
*/
public class SymbolicPathNameTlvTest {
private final byte[] value1 = {0x41 };
private final Short length1 = new Short((short) 2);
private final SymbolicPathNameTlv tlv1 = SymbolicPathNameTlv.of(value1, length1);
private final byte[] value2 = {0x41 };
private final Short length2 = new Short((short) 2);
private final SymbolicPathNameTlv tlv2 = SymbolicPathNameTlv.of(value1, length2);
private final byte[] value3 = {0x41, 0x43 };
private final Short length3 = new Short((short) 3);
private final SymbolicPathNameTlv tlv3 = SymbolicPathNameTlv.of(value3, length3);
@Test
public void basics() {
new EqualsTester().addEqualityGroup(tlv1, tlv2).addEqualityGroup(tlv3).testEquals();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.TEDefaultMetricTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.TEDefaultMetricTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
\ No newline at end of file
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import java.util.LinkedList;
import org.junit.Test;
import org.onosproject.pcepio.types.AdministrativeGroupTlv;
import org.onosproject.pcepio.types.MaximumReservableLinkBandwidthTlv;
import org.onosproject.pcepio.types.PcepValueType;
import org.onosproject.pcepio.types.TELinkAttributesTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import java.util.LinkedList;
import org.junit.Test;
import org.onosproject.pcepio.types.AdministrativeGroupTlv;
import org.onosproject.pcepio.types.MaximumReservableLinkBandwidthTlv;
import org.onosproject.pcepio.types.PcepValueType;
import org.onosproject.pcepio.types.TELinkAttributesTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import java.util.LinkedList;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv;
import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv;
import org.onosproject.pcepio.types.PcepValueType;
import org.onosproject.pcepio.types.TELinkDescriptorsTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import java.util.LinkedList;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv;
import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv;
import org.onosproject.pcepio.types.PcepValueType;
import org.onosproject.pcepio.types.TELinkDescriptorsTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import java.util.LinkedList;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4TERouterIdOfLocalNodeTlv;
import org.onosproject.pcepio.types.NodeFlagBitsTlv;
import org.onosproject.pcepio.types.PcepValueType;
import org.onosproject.pcepio.types.TENodeAttributesTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import java.util.LinkedList;
import org.junit.Test;
import org.onosproject.pcepio.types.IPv4TERouterIdOfLocalNodeTlv;
import org.onosproject.pcepio.types.NodeFlagBitsTlv;
import org.onosproject.pcepio.types.PcepValueType;
import org.onosproject.pcepio.types.TENodeAttributesTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.TedCapabilityTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.TedCapabilityTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.UnreservedBandwidthTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.pcepio;
import org.junit.Test;
import org.onosproject.pcepio.types.UnreservedBandwidthTlv;
import com.google.common.testing.EqualsTester;
/**
* 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();
}
}
......