summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@att.com>2017-10-09 11:08:05 +0300
committerOfir Sonsino <os0695@att.com>2017-10-09 11:08:05 +0300
commit78028f3b588241200e31b71b8190e9926af626e9 (patch)
tree4cc4969710b9f815f382f5e387f2da1bf404703a /vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java
parent3274b39fef63c43c6eeb202e98b71b01e0f714ff (diff)
Improve SONAR coverage
Change-Id: Ib36c2e6df9fe100a301b89769078c7a06d3a9ae5 Issue-ID: VID-72 Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java')
-rw-r--r--vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java206
1 files changed, 206 insertions, 0 deletions
diff --git a/vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java b/vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java
new file mode 100644
index 000000000..f28558570
--- /dev/null
+++ b/vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java
@@ -0,0 +1,206 @@
+package org.openecomp.vid.client;
+
+import java.util.Enumeration;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpSessionContext;
+
+import org.junit.Test;
+
+
+public class FakeHttpSessionTest {
+
+ private FakeHttpSession createTestSubject() {
+ return new FakeHttpSession();
+ }
+
+
+ @Test
+ public void testGetCreationTime() throws Exception {
+ FakeHttpSession testSubject;
+ long result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getCreationTime();
+ }
+
+
+ @Test
+ public void testGetId() throws Exception {
+ FakeHttpSession testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getId();
+ }
+
+
+ @Test
+ public void testGetLastAccessedTime() throws Exception {
+ FakeHttpSession testSubject;
+ long result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getLastAccessedTime();
+ }
+
+
+ @Test
+ public void testGetServletContext() throws Exception {
+ FakeHttpSession testSubject;
+ ServletContext result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getServletContext();
+ }
+
+
+ @Test
+ public void testSetMaxInactiveInterval() throws Exception {
+ FakeHttpSession testSubject;
+ int maxInactiveInterval = 0;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setMaxInactiveInterval(maxInactiveInterval);
+ }
+
+
+ @Test
+ public void testGetMaxInactiveInterval() throws Exception {
+ FakeHttpSession testSubject;
+ int result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getMaxInactiveInterval();
+ }
+
+
+ @Test
+ public void testGetSessionContext() throws Exception {
+ FakeHttpSession testSubject;
+ HttpSessionContext result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getSessionContext();
+ }
+
+
+ @Test
+ public void testGetAttribute() throws Exception {
+ FakeHttpSession testSubject;
+ String name = "";
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getAttribute(name);
+ }
+
+
+ @Test
+ public void testGetValue() throws Exception {
+ FakeHttpSession testSubject;
+ String name = "";
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getValue(name);
+ }
+
+
+ @Test
+ public void testGetAttributeNames() throws Exception {
+ FakeHttpSession testSubject;
+ Enumeration<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getAttributeNames();
+ }
+
+
+ @Test
+ public void testGetValueNames() throws Exception {
+ FakeHttpSession testSubject;
+ String[] result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getValueNames();
+ }
+
+
+ @Test
+ public void testSetAttribute() throws Exception {
+ FakeHttpSession testSubject;
+ String name = "";
+ Object value = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setAttribute(name, value);
+ }
+
+
+ @Test
+ public void testPutValue() throws Exception {
+ FakeHttpSession testSubject;
+ String name = "";
+ Object value = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.putValue(name, value);
+ }
+
+
+ @Test
+ public void testRemoveAttribute() throws Exception {
+ FakeHttpSession testSubject;
+ String name = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.removeAttribute(name);
+ }
+
+
+ @Test
+ public void testRemoveValue() throws Exception {
+ FakeHttpSession testSubject;
+ String name = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.removeValue(name);
+ }
+
+
+ @Test
+ public void testInvalidate() throws Exception {
+ FakeHttpSession testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.invalidate();
+ }
+
+
+ @Test
+ public void testIsNew() throws Exception {
+ FakeHttpSession testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isNew();
+ }
+} \ No newline at end of file