Committed by
Gerrit Code Review
Pcep TLV UT updated to change default ipv6 address
Change-Id: Ib4d8a38ef5b2ff18ede84401e210c1632eedc24d
Showing
4 changed files
with
20 additions
and
12 deletions
1 | /* | 1 | /* |
2 | - * Copyright 2014 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | * | 3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
... | @@ -25,8 +25,10 @@ import org.onosproject.pcepio.types.IPv6InterfaceAddressTlv; | ... | @@ -25,8 +25,10 @@ import org.onosproject.pcepio.types.IPv6InterfaceAddressTlv; |
25 | */ | 25 | */ |
26 | public class IPv6InterfaceAddressTlvTest { | 26 | public class IPv6InterfaceAddressTlvTest { |
27 | 27 | ||
28 | - private byte[] b1 = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; | 28 | + private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, |
29 | - private byte[] b2 = new byte[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; | 29 | + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; |
30 | + private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, | ||
31 | + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; | ||
30 | 32 | ||
31 | private final IPv6InterfaceAddressTlv tlv1 = IPv6InterfaceAddressTlv.of(b1); | 33 | private final IPv6InterfaceAddressTlv tlv1 = IPv6InterfaceAddressTlv.of(b1); |
32 | private final IPv6InterfaceAddressTlv sameAsTlv1 = IPv6InterfaceAddressTlv.of(b1); | 34 | private final IPv6InterfaceAddressTlv sameAsTlv1 = IPv6InterfaceAddressTlv.of(b1); | ... | ... |
1 | /* | 1 | /* |
2 | - * Copyright 2014 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | * | 3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
... | @@ -25,8 +25,10 @@ import org.onosproject.pcepio.types.IPv6NeighborAddressTlv; | ... | @@ -25,8 +25,10 @@ import org.onosproject.pcepio.types.IPv6NeighborAddressTlv; |
25 | */ | 25 | */ |
26 | public class IPv6NeighborAddressTlvTest { | 26 | public class IPv6NeighborAddressTlvTest { |
27 | 27 | ||
28 | - private byte[] b1 = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; | 28 | + private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, |
29 | - private byte[] b2 = new byte[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; | 29 | + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; |
30 | + private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, | ||
31 | + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; | ||
30 | 32 | ||
31 | private final IPv6NeighborAddressTlv tlv1 = IPv6NeighborAddressTlv.of(b1); | 33 | private final IPv6NeighborAddressTlv tlv1 = IPv6NeighborAddressTlv.of(b1); |
32 | private final IPv6NeighborAddressTlv sameAsTlv1 = IPv6NeighborAddressTlv.of(b1); | 34 | private final IPv6NeighborAddressTlv sameAsTlv1 = IPv6NeighborAddressTlv.of(b1); | ... | ... |
1 | /* | 1 | /* |
2 | - * Copyright 2014 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | * | 3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
... | @@ -25,8 +25,10 @@ import org.onosproject.pcepio.types.IPv6TERouterIdofLocalNodeTlv; | ... | @@ -25,8 +25,10 @@ import org.onosproject.pcepio.types.IPv6TERouterIdofLocalNodeTlv; |
25 | */ | 25 | */ |
26 | public class IPv6TERouterIdofLocalNodeTlvTest { | 26 | public class IPv6TERouterIdofLocalNodeTlvTest { |
27 | 27 | ||
28 | - private byte[] b1 = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; | 28 | + private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, |
29 | - private byte[] b2 = new byte[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; | 29 | + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; |
30 | + private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, | ||
31 | + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; | ||
30 | 32 | ||
31 | private final IPv6TERouterIdofLocalNodeTlv tlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1); | 33 | private final IPv6TERouterIdofLocalNodeTlv tlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1); |
32 | private final IPv6TERouterIdofLocalNodeTlv sameAsTlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1); | 34 | private final IPv6TERouterIdofLocalNodeTlv sameAsTlv1 = IPv6TERouterIdofLocalNodeTlv.of(b1); | ... | ... |
1 | /* | 1 | /* |
2 | - * Copyright 2014 Open Networking Laboratory | 2 | + * Copyright 2015 Open Networking Laboratory |
3 | * | 3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
... | @@ -25,8 +25,10 @@ import org.onosproject.pcepio.types.IPv6TERouterIdofRemoteNodeTlv; | ... | @@ -25,8 +25,10 @@ import org.onosproject.pcepio.types.IPv6TERouterIdofRemoteNodeTlv; |
25 | */ | 25 | */ |
26 | public class IPv6TERouterIdofRemoteNodeTlvTest { | 26 | public class IPv6TERouterIdofRemoteNodeTlvTest { |
27 | 27 | ||
28 | - private byte[] b1 = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; | 28 | + private final byte[] b1 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, |
29 | - private byte[] b2 = new byte[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; | 29 | + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x29, 0x00, 0x02, 0x00, 0x00}; |
30 | + private final byte[] b2 = new byte[] {(byte) 0xFE, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, | ||
31 | + (byte) 0xB3, (byte) 0xFF, (byte) 0xFE, 0x1E, (byte) 0x83, 0x30, 0x00, 0x02, 0x00, 0x00 }; | ||
30 | 32 | ||
31 | private final IPv6TERouterIdofRemoteNodeTlv tlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1); | 33 | private final IPv6TERouterIdofRemoteNodeTlv tlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1); |
32 | private final IPv6TERouterIdofRemoteNodeTlv sameAsTlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1); | 34 | private final IPv6TERouterIdofRemoteNodeTlv sameAsTlv1 = IPv6TERouterIdofRemoteNodeTlv.of(b1); | ... | ... |
-
Please register or login to post a comment