Move tests to base package 25/60425/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 15 Jul 2017 12:42:14 +0000 (14:42 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 15 Jul 2017 12:42:14 +0000 (14:42 +0200)
Test FQCN is used by surefire to generate a report file, which has
limits on its length, causing problems with archival.

Move these tests to base model package to keep the file name short.

Change-Id: I90a49004c235590c87cb331e7cd31f693b3cd6d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/openconfig-api/src/test/java/org/opendaylight/yang/gen/v1/http/openconfig/net/yang/bgp/policy/rev151009/ExtInlineCommunitiesBuilderTest.java [moved from bgp/openconfig-api/src/test/java/org/opendaylight/yang/gen/v1/http/openconfig/net/yang/bgp/policy/rev151009/routing/policy/policy/definitions/policy/definition/statements/statement/actions/bgp/actions/set/ext/community/set/ext/community/method/InlineCommunitiesBuilderTest.java with 63% similarity]
bgp/openconfig-api/src/test/java/org/opendaylight/yang/gen/v1/http/openconfig/net/yang/bgp/policy/rev151009/InlineCommunitiesBuilderTest.java [moved from bgp/openconfig-api/src/test/java/org/opendaylight/yang/gen/v1/http/openconfig/net/yang/bgp/policy/rev151009/routing/policy/policy/definitions/policy/definition/statements/statement/actions/bgp/actions/set/community/set/community/method/InlineCommunitiesBuilderTest.java with 66% similarity]

@@ -6,18 +6,21 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009.routing.policy.policy.definitions.policy.definition.statements.statement.actions.bgp.actions.set.ext.community.set.ext.community.method;
+package org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009;
+
+import static org.junit.Assert.assertEquals;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009.routing.policy.policy.definitions.policy.definition.statements.statement.actions.bgp.actions.set.ext.community.set.ext.community.method.Inline.Communities;
+import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009.routing.policy.policy.definitions.policy.definition.statements.statement.actions.bgp.actions.set.ext.community.set.ext.community.method.InlineCommunitiesBuilder;
 
-public class InlineCommunitiesBuilderTest {
+// This test is not in the appropriate package to work around file name limitations
+public class ExtInlineCommunitiesBuilderTest {
 
     @Test
     public void testValid() {
         final Communities communities = InlineCommunitiesBuilder.getDefaultInstance("route-origin:12.34.56.78:123");
-        Assert.assertEquals("route-origin:12.34.56.78:123", communities.getBgpExtCommunityType().getString());
+        assertEquals("route-origin:12.34.56.78:123", communities.getBgpExtCommunityType().getString());
     }
 
     @Test(expected=IllegalArgumentException.class)
@@ -6,23 +6,25 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009.routing.policy.policy.definitions.policy.definition.statements.statement.actions.bgp.actions.set.community.set.community.method;
+package org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009;
+
+import static org.junit.Assert.assertEquals;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009.routing.policy.policy.definitions.policy.definition.statements.statement.actions.bgp.actions.set.community.set.community.method.Inline.Communities;
+import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009.routing.policy.policy.definitions.policy.definition.statements.statement.actions.bgp.actions.set.community.set.community.method.InlineCommunitiesBuilder;
 
+// This test is not in the appropriate package to work around file name limitations
 public class InlineCommunitiesBuilderTest {
 
     @Test
     public void testValid() {
         final Communities communities = InlineCommunitiesBuilder.getDefaultInstance("123");
-        Assert.assertEquals(123L, communities.getBgpStdCommunityType().getUint32().longValue());
+        assertEquals(123L, communities.getBgpStdCommunityType().getUint32().longValue());
     }
 
     @Test(expected=IllegalArgumentException.class)
     public void testInvalid() {
         InlineCommunitiesBuilder.getDefaultInstance("abc");
     }
-
 }