summaryrefslogtreecommitdiffstats
path: root/authz-core/src/test/java/com/att/cssa
diff options
context:
space:
mode:
authorsg481n <sg481n@att.com>2017-08-25 00:57:25 -0400
committersg481n <sg481n@att.com>2017-08-25 00:57:35 -0400
commit0e5efc61b657dba874aacc95ee21c76b95fb2028 (patch)
tree27faac27d58557dfeba6db386c6bf0b863b67d0d /authz-core/src/test/java/com/att/cssa
parentdcf76988526af8e15181a29987383af2e1d64156 (diff)
Update aaf client module
Remove aaf submodules and update aaf client module. Issue-id: AAF-21 Change-Id: I750ec9e26596652a142b014db94aabd082880130 Signed-off-by: sg481n <sg481n@att.com>
Diffstat (limited to 'authz-core/src/test/java/com/att/cssa')
-rw-r--r--authz-core/src/test/java/com/att/cssa/rserv/JU_CachingFileAccess.java49
-rw-r--r--authz-core/src/test/java/com/att/cssa/rserv/JU_CodeSetter.java67
-rw-r--r--authz-core/src/test/java/com/att/cssa/rserv/JU_Pair.java45
-rw-r--r--authz-core/src/test/java/com/att/cssa/rserv/JU_Routes.java69
-rw-r--r--authz-core/src/test/java/com/att/cssa/rserv/JU_TypedCode.java51
-rw-r--r--authz-core/src/test/java/com/att/cssa/rserv/JU_Version.java57
-rw-r--r--authz-core/src/test/java/com/att/cssa/rserv/test/JU_BetterMatch.java166
-rw-r--r--authz-core/src/test/java/com/att/cssa/rserv/test/JU_Content.java132
8 files changed, 0 insertions, 636 deletions
diff --git a/authz-core/src/test/java/com/att/cssa/rserv/JU_CachingFileAccess.java b/authz-core/src/test/java/com/att/cssa/rserv/JU_CachingFileAccess.java
deleted file mode 100644
index a82429a8..00000000
--- a/authz-core/src/test/java/com/att/cssa/rserv/JU_CachingFileAccess.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START====================================================
- * * org.onap.aaf
- * * ===========================================================================
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * * ===========================================================================
- * * 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.
- * * ============LICENSE_END====================================================
- * *
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * *
- ******************************************************************************/
-package com.att.cssa.rserv;
-
-import static org.junit.Assert.*;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-
-@RunWith(PowerMockRunner.class)
-public class JU_CachingFileAccess {
- CachingFileAccess cachingFileAccess;
-
-
- @Before
- public void setUp(){
- cachingFileAccess = new CachingFileAccess(null, null);
-
- }
-
- @Test
- public void test() {
- assertTrue(true);
- }
-
-}
diff --git a/authz-core/src/test/java/com/att/cssa/rserv/JU_CodeSetter.java b/authz-core/src/test/java/com/att/cssa/rserv/JU_CodeSetter.java
deleted file mode 100644
index b1555524..00000000
--- a/authz-core/src/test/java/com/att/cssa/rserv/JU_CodeSetter.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START====================================================
- * * org.onap.aaf
- * * ===========================================================================
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * * ===========================================================================
- * * 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.
- * * ============LICENSE_END====================================================
- * *
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * *
- ******************************************************************************/
-package com.att.cssa.rserv;
-
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import com.att.inno.env.Trans;
-
-@RunWith(PowerMockRunner.class)
-public class JU_CodeSetter {
- CodeSetter codeSetter;
- @Mock
- Trans transMock;
- @Mock
- HttpServletRequest reqMock;
- @Mock
- HttpServletResponse respMock;
-
- @Before
- public void setUp(){
- codeSetter = new CodeSetter(transMock, reqMock, respMock);
- }
-
- @SuppressWarnings("rawtypes")
- @Mock
- Route routeMock;
-
- @Test
- public void testMatches() throws IOException, ServletException{
- boolean result = codeSetter.matches(routeMock);
- System.out.println("value of res " + codeSetter.matches(routeMock));
- assertFalse(result);
- }
-
-}
diff --git a/authz-core/src/test/java/com/att/cssa/rserv/JU_Pair.java b/authz-core/src/test/java/com/att/cssa/rserv/JU_Pair.java
deleted file mode 100644
index f1859584..00000000
--- a/authz-core/src/test/java/com/att/cssa/rserv/JU_Pair.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START====================================================
- * * org.onap.aaf
- * * ===========================================================================
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * * ===========================================================================
- * * 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.
- * * ============LICENSE_END====================================================
- * *
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * *
- ******************************************************************************/
-package com.att.cssa.rserv;
-
-import static org.junit.Assert.*;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class JU_Pair {
- Pair pair;
- Object x;
- Object y;
-
- @Before
- public void setUp(){
- pair = new Pair(x, y);
- }
-
- @Test
- public void test() {
- assertTrue(true);
- }
-
-}
diff --git a/authz-core/src/test/java/com/att/cssa/rserv/JU_Routes.java b/authz-core/src/test/java/com/att/cssa/rserv/JU_Routes.java
deleted file mode 100644
index f6b2bba0..00000000
--- a/authz-core/src/test/java/com/att/cssa/rserv/JU_Routes.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START====================================================
- * * org.onap.aaf
- * * ===========================================================================
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * * ===========================================================================
- * * 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.
- * * ============LICENSE_END====================================================
- * *
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * *
- ******************************************************************************/
-package com.att.cssa.rserv;
-
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.util.List;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import com.att.inno.env.Trans;
-
-@RunWith(PowerMockRunner.class)
-public class JU_Routes {
- Routes routes;
- @Mock
- HttpServletRequest reqMock;
- CodeSetter<Trans> codeSetterMock;
- Route<Trans> routeObj;
-
- @Before
- public void setUp(){
- routes = new Routes();
- }
-
- @Test
- public void testRouteReport(){
- List listVal = routes.routeReport();
- System.out.println("value of Listval " +listVal);
- assertNotNull(listVal);
-
- }
-
- @Test
- public void testDerive() throws IOException, ServletException{
- routeObj = routes.derive(reqMock, codeSetterMock);
- System.out.println("value of routeObj" +routeObj);
- }
-
-
-}
diff --git a/authz-core/src/test/java/com/att/cssa/rserv/JU_TypedCode.java b/authz-core/src/test/java/com/att/cssa/rserv/JU_TypedCode.java
deleted file mode 100644
index cb1502be..00000000
--- a/authz-core/src/test/java/com/att/cssa/rserv/JU_TypedCode.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START====================================================
- * * org.onap.aaf
- * * ===========================================================================
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * * ===========================================================================
- * * 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.
- * * ============LICENSE_END====================================================
- * *
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * *
- ******************************************************************************/
-package com.att.cssa.rserv;
-
-import static org.junit.Assert.*;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-@RunWith(PowerMockRunner.class)
-public class JU_TypedCode {
- TypedCode typedCode;
- @Mock
- RouteReport routeReportMock;
-
- @Before
- public void setUp(){
- typedCode = new TypedCode();
- }
-
- @Test
- public void testFirst(){
- String returnVal = typedCode.first();
- assertNull(returnVal);
- }
-
-
-}
diff --git a/authz-core/src/test/java/com/att/cssa/rserv/JU_Version.java b/authz-core/src/test/java/com/att/cssa/rserv/JU_Version.java
deleted file mode 100644
index 12815b2d..00000000
--- a/authz-core/src/test/java/com/att/cssa/rserv/JU_Version.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START====================================================
- * * org.onap.aaf
- * * ===========================================================================
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * * ===========================================================================
- * * 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.
- * * ============LICENSE_END====================================================
- * *
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * *
- ******************************************************************************/
-package com.att.cssa.rserv;
-
-import static org.junit.Assert.*;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Matchers;
-import org.mockito.Mock;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-@RunWith(PowerMockRunner.class)
-public class JU_Version {
- Version version;
-
-
- @Before
- public void setUp(){
- version = new Version("String");
- }
-
- @Test
- public void testEquals(){
- boolean val = version.equals(version);
- System.out.println("value of val " +val);
- assertTrue(val);
- }
-
- @Test
- public void testToString(){
- String strVal = version.toString();
- System.out.println("value of strVal " +strVal);
- assertNotNull(strVal);
- }
-}
diff --git a/authz-core/src/test/java/com/att/cssa/rserv/test/JU_BetterMatch.java b/authz-core/src/test/java/com/att/cssa/rserv/test/JU_BetterMatch.java
deleted file mode 100644
index b0f270f4..00000000
--- a/authz-core/src/test/java/com/att/cssa/rserv/test/JU_BetterMatch.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START====================================================
- * * org.onap.aaf
- * * ===========================================================================
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * * ===========================================================================
- * * 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.
- * * ============LICENSE_END====================================================
- * *
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * *
- ******************************************************************************/
-package com.att.cssa.rserv.test;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
-
-import org.junit.Test;
-
-import com.att.cssa.rserv.Match;
-import com.att.inno.env.Env;
-import com.att.inno.env.TimeTaken;
-import com.att.inno.env.Trans;
-import com.att.inno.env.impl.EnvFactory;
-
-
-public class JU_BetterMatch {
-
- @Test
- public void test() {
- Trans trans = EnvFactory.newTrans();
- // Bad Match
- Match bm = new Match("/req/1.0.0/:var");
-
- assertTrue(bm.match("/req/1.0.0/fred"));
- assertTrue(bm.match("/req/1.0.0/wilma"));
- assertTrue(bm.match("/req/1.0.0/wilma/"));
- assertFalse(bm.match("/req/1.0.0/wilma/bambam"));
- assertFalse(bm.match("/not/valid/234"));
- assertFalse(bm.match(""));
-
- TimeTaken tt = trans.start("A", Env.SUB);
- TimeTaken tt2;
- int i = 0;
- try {
- bm = new Match(null);
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertTrue(bm.match(""));
- tt2.done();
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertTrue(bm.match(null));
- tt2.done();
- } finally {
- tt.done();
- }
-
-
- tt = trans.start("B", Env.SUB);
- i = 0;
- try {
- bm = new Match("/req/1.0.0/:urn/:ref");
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertTrue(bm.match("/req/1.0.0/urn:fsdb,1.0,req,newreq/0x12345"));
- tt2.done();
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertFalse(bm.match("/req/1.0.0/urn"));
- tt2.done();
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertTrue(bm.match("/req/1.0.0/urn:fsdb,1.0,req,newreq/0x12345/"));
- tt2.done();
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertFalse(bm.match("/req/1.0.0/urn:fsdb,1.0,req,newreq/0x12345/x"));
- tt2.done();
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertFalse(bm.match("/req/1.0.0/urn:fsdb,1.0,req,newreq/0x12345/xyx"));
- } finally {
- tt2.done();
- tt.done();
- }
-
- tt = trans.start("C", Env.SUB);
- i = 0;
- try {
- String url = "/req/1.0.0/";
- bm = new Match(url+":urn*");
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- String value = "urn:fsdb,1.0,req,newreq/0x12345";
-
- assertTrue(bm.match(url+value));
- assertEquals("urn:fsdb,1.0,req,newreq/0x12345",bm.param(url+value, ":urn"));
- } finally {
- tt2.done();
- tt.done();
- }
-
- tt = trans.start("D", Env.SUB);
- i = 0;
- try {
- bm = new Match("/req/1.0.0/:urn/:ref*");
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertTrue(bm.match("/req/1.0.0/urn:fsdb,1.0,req,newreq/0x12345"));
- tt2.done();
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertFalse(bm.match("/req/1.0.0/urn:fsdb,1.0,req,newreq/"));
- } finally {
- tt2.done();
- tt.done();
- }
-
- tt = trans.start("E", Env.SUB);
- i = 0;
- try {
- bm = new Match("this*");
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertTrue(bm.match("this"));
- tt2.done();
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertTrue(bm.match("thisandthat"));
- tt2.done();
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertTrue(bm.match("this/1.0.0/urn:fsdb,1.0,req,newreq/0x12345/"));
- } finally {
- tt2.done();
- tt.done();
- }
-
- tt = trans.start("F", Env.SUB);
- i = 0;
- try {
- bm = new Match("*");
- tt2 = trans.start(Integer.toString(++i), Env.SUB);
- assertTrue(bm.match("<pass>/this"));
- } finally {
- tt2.done();
- tt.done();
- }
-
- StringBuilder sb = new StringBuilder();
- trans.auditTrail(0, sb);
- System.out.println(sb);
-
- }
-
- @Test
- public void specialTest() {
- Match match = new Match("/sample");
- assertTrue(match.match("/sample"));
-
- match = new Match("/lpeer//lpeer/:key/:item*");
- assertTrue(match.match("/lpeer//lpeer/x/y"));
- assertFalse(match.match("/lpeer/x/lpeer/x/y"));
-
- }
-
-}
diff --git a/authz-core/src/test/java/com/att/cssa/rserv/test/JU_Content.java b/authz-core/src/test/java/com/att/cssa/rserv/test/JU_Content.java
deleted file mode 100644
index 7bc51b55..00000000
--- a/authz-core/src/test/java/com/att/cssa/rserv/test/JU_Content.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START====================================================
- * * org.onap.aaf
- * * ===========================================================================
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * * ===========================================================================
- * * 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.
- * * ============LICENSE_END====================================================
- * *
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * *
- ******************************************************************************/
-package com.att.cssa.rserv.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.io.IOException;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.junit.Test;
-
-import com.att.cssa.rserv.HttpCode;
-import com.att.cssa.rserv.TypedCode;
-import com.att.inno.env.TransJAXB;
-import com.att.inno.env.impl.EnvFactory;
-
-
-/**
- * Test the functioning of the "Content" class, which holds, and routes to the right code based on Accept values
- */
-public class JU_Content {
-
-
- @Test
- public void test() throws Exception {
- final String BOOL = "Boolean";
- final String XML = "XML";
- TransJAXB trans = EnvFactory.newTrans();
- try {
- HttpCode<TransJAXB, String> cBool = new HttpCode<TransJAXB,String>(BOOL,"Standard String") {
- @Override
- public void handle(TransJAXB trans, HttpServletRequest req, HttpServletResponse resp) {
- try {
- resp.getOutputStream().write(context.getBytes());
- } catch (IOException e) {
- }
- }
- };
-
- HttpCode<TransJAXB,String> cXML = new HttpCode<TransJAXB,String>(XML, "Standard String") {
- @Override
- public void handle(TransJAXB trans, HttpServletRequest req, HttpServletResponse resp) {
- try {
- resp.getOutputStream().write(context.getBytes());
- } catch (IOException e) {
- }
- }
- };
-
- TypedCode<TransJAXB> ct = new TypedCode<TransJAXB>()
- .add(cBool,"application/" + Boolean.class.getName()+"+xml;charset=utf8;version=1.1")
- .add(cXML,"application/xml;q=.9");
- String expected = "application/java.lang.Boolean+xml;charset=utf8;version=1.1,application/xml;q=0.9";
- assertEquals(expected,ct.toString());
-
- //BogusReq req = new BogusReq();
- //expected = (expected);
- //HttpServletResponse resp = new BogusResp();
-
- assertNotNull("Same Content String and Accept String",ct.prep(trans,expected));
-
- //expects Null (not run)
- // A Boolean xml that must have charset utf8 and match version 1.2 or greater
- expected = ("application/java.lang.Boolean+xml;charset=utf8;version=1.2");
- assertNull("Accept Minor Version greater than Content Minor Version",ct.prep(trans,expected));
-
- // Same with (too many) spaces
- expected = (" application/java.lang.Boolean+xml ; charset = utf8 ; version = 1.2 ");
- assertNull("Accept Minor Version greater than Content Minor Version",ct.prep(trans,expected));
-
- //expects Null (not run)
- expected = ("application/java.lang.Boolean+xml;charset=utf8;version=2.1");
- assertNull("Major Versions not the same",ct.prep(trans,expected));
-
- expected = ("application/java.lang.Boolean+xml;charset=utf8;version=1.0");
- assertNotNull("Content Minor Version is greater than Accept Minor Version",ct.prep(trans,expected));
-
- expected = "application/java.lang.Squid+xml;charset=utf8;version=1.0,application/xml;q=.9";
- assertNotNull("2nd one will have to do...",ct.prep(trans,expected));
-
- expected = "application/java.lang.Boolean+xml;charset=UTF8;version=1.0";
- assertNotNull("Minor Charset in Caps acceptable",ct.prep(trans,expected));
-
- // expects no run
- expected="application/java.lang.Boolean+xml;charset=MyType;version=1.0";
- assertNull("Unknown Minor Charset",ct.prep(trans,expected));
-
- expected="";
- assertNotNull("Blank Acceptance",ct.prep(trans,expected));
-
- expected=null;
- assertNotNull("Null Acceptance",ct.prep(trans,expected));
-
- expected = ("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
- assertNotNull("Matches application/xml, and other content not known",ct.prep(trans,expected));
-
- // No SemiColon
- expected = ("i/am/bogus,application/xml");
- assertNotNull("Match second entry, with no Semis",ct.prep(trans,expected));
-
- } finally {
- StringBuilder sb = new StringBuilder();
- trans.auditTrail(0, sb);
- System.out.println(sb);
- }
- }
-
-}