Pavlin Radoslavov

Updated/fixed the SDN-IP BGP unit tests after some of the BGP-related

code whas changed.

Change-Id: Ie36ad03e3ae7544e7883e2b2aca4c94537750321
......@@ -66,8 +66,8 @@ public class AsPathTest {
String expectedString =
"AsPath{pathSegments=" +
"[PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}, " +
"PathSegment{type=1, segmentAsNumbers=[4, 5, 6]}]}";
"[PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}, " +
"PathSegment{type=AS_SET, segmentAsNumbers=[4, 5, 6]}]}";
assertThat(asPath.toString(), is(expectedString));
}
......@@ -177,8 +177,8 @@ public class AsPathTest {
String expectedString =
"AsPath{pathSegments=" +
"[PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}, " +
"PathSegment{type=1, segmentAsNumbers=[4, 5, 6]}]}";
"[PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}, " +
"PathSegment{type=AS_SET, segmentAsNumbers=[4, 5, 6]}]}";
assertThat(asPath.toString(), is(expectedString));
}
}
......
......@@ -130,9 +130,9 @@ public class BgpRouteEntryTest {
String expectedString =
"BgpRouteEntry{prefix=1.2.3.0/24, nextHop=5.6.7.8, " +
"bgpId=10.0.0.1, origin=0, asPath=AsPath{pathSegments=" +
"[PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}, " +
"PathSegment{type=1, segmentAsNumbers=[4, 5, 6]}]}, " +
"bgpId=10.0.0.1, origin=IGP, asPath=AsPath{pathSegments=" +
"[PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}, " +
"PathSegment{type=AS_SET, segmentAsNumbers=[4, 5, 6]}]}, " +
"localPref=100, multiExitDisc=20}";
assertThat(bgpRouteEntry.toString(), is(expectedString));
}
......@@ -504,9 +504,9 @@ public class BgpRouteEntryTest {
String expectedString =
"BgpRouteEntry{prefix=1.2.3.0/24, nextHop=5.6.7.8, " +
"bgpId=10.0.0.1, origin=0, asPath=AsPath{pathSegments=" +
"[PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}, " +
"PathSegment{type=1, segmentAsNumbers=[4, 5, 6]}]}, " +
"bgpId=10.0.0.1, origin=IGP, asPath=AsPath{pathSegments=" +
"[PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}, " +
"PathSegment{type=AS_SET, segmentAsNumbers=[4, 5, 6]}]}, " +
"localPref=100, multiExitDisc=20}";
assertThat(bgpRouteEntry.toString(), is(expectedString));
}
......
......@@ -52,7 +52,7 @@ public class PathSegmentTest {
BgpRouteEntry.PathSegment pathSegment = generatePathSegment();
String expectedString =
"PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}";
"PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}";
assertThat(pathSegment.toString(), is(expectedString));
}
......@@ -124,7 +124,7 @@ public class PathSegmentTest {
BgpRouteEntry.PathSegment pathSegment = generatePathSegment();
String expectedString =
"PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}";
"PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}";
assertThat(pathSegment.toString(), is(expectedString));
}
}
......