X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cadi%2Fcore%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fcadi%2Futil%2Ftest%2FJU_UserChainManip.java;h=9e4cd88da7a671b2031122944bc710db70b847f4;hb=refs%2Fchanges%2F75%2F65275%2F1;hp=21f8c21b028275cee6644fee8c2d82b34166a34b;hpb=824dc7b5fc0e1ccdf7f460479aff344727f0f01e;p=aaf%2Fauthz.git diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_UserChainManip.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_UserChainManip.java index 21f8c21b..9e4cd88d 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_UserChainManip.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_UserChainManip.java @@ -29,39 +29,39 @@ import org.onap.aaf.cadi.util.UserChainManip; public class JU_UserChainManip { - @Test - public void build(){ - UserChain.Protocol baseAuth=UserChain.Protocol.BasicAuth; - StringBuilder sb = UserChainManip.build(new StringBuilder(""), "app", "id", baseAuth, true); - assertThat(sb.toString(), is("app:id:BasicAuth:AS")); + @Test + public void build(){ + UserChain.Protocol baseAuth=UserChain.Protocol.BasicAuth; + StringBuilder sb = UserChainManip.build(new StringBuilder(""), "app", "id", baseAuth, true); + assertThat(sb.toString(), is("app:id:BasicAuth:AS")); - // for coverage - sb = UserChainManip.build(sb, "app", "id", baseAuth, true); - assertThat(sb.toString(), is("app:id:BasicAuth:AS,app:id:BasicAuth")); + // for coverage + sb = UserChainManip.build(sb, "app", "id", baseAuth, true); + assertThat(sb.toString(), is("app:id:BasicAuth:AS,app:id:BasicAuth")); - sb = UserChainManip.build(new StringBuilder(""), "app", "id", baseAuth, false); - assertThat(sb.toString(), is("app:id:BasicAuth")); - } + sb = UserChainManip.build(new StringBuilder(""), "app", "id", baseAuth, false); + assertThat(sb.toString(), is("app:id:BasicAuth")); + } - @Test - public void idToNSTEST() { - assertThat(UserChainManip.idToNS(null), is("")); - assertThat(UserChainManip.idToNS(""), is("")); - assertThat(UserChainManip.idToNS("something"), is("")); - assertThat(UserChainManip.idToNS("something@@"), is("")); - assertThat(UserChainManip.idToNS("something@@."), is("")); - assertThat(UserChainManip.idToNS("something@com"), is("com")); - assertThat(UserChainManip.idToNS("something@random.com"), is("com.random")); - assertThat(UserChainManip.idToNS("@random.com"), is("com.random")); - assertThat(UserChainManip.idToNS("something@random.com."), is("com.random")); - assertThat(UserChainManip.idToNS("something@..random...com..."), is("com.random")); - assertThat(UserChainManip.idToNS("something@this.random.com"), is("com.random.this")); - } + @Test + public void idToNSTEST() { + assertThat(UserChainManip.idToNS(null), is("")); + assertThat(UserChainManip.idToNS(""), is("")); + assertThat(UserChainManip.idToNS("something"), is("")); + assertThat(UserChainManip.idToNS("something@@"), is("")); + assertThat(UserChainManip.idToNS("something@@."), is("")); + assertThat(UserChainManip.idToNS("something@com"), is("com")); + assertThat(UserChainManip.idToNS("something@random.com"), is("com.random")); + assertThat(UserChainManip.idToNS("@random.com"), is("com.random")); + assertThat(UserChainManip.idToNS("something@random.com."), is("com.random")); + assertThat(UserChainManip.idToNS("something@..random...com..."), is("com.random")); + assertThat(UserChainManip.idToNS("something@this.random.com"), is("com.random.this")); + } - @Test - public void coverageTest() { - @SuppressWarnings("unused") - UserChainManip ucm = new UserChainManip(); - } + @Test + public void coverageTest() { + @SuppressWarnings("unused") + UserChainManip ucm = new UserChainManip(); + } }