Skip to content

Commit c34e1a2

Browse files
committed
initial import of CookieJar testcase structure
1 parent 4ee3fb1 commit c34e1a2

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.ning.http.client.cookiejar;
2+
3+
import static org.testng.Assert.assertNotNull;
4+
5+
import org.testng.annotations.AfterSuite;
6+
import org.testng.annotations.BeforeSuite;
7+
import org.testng.annotations.Test;
8+
9+
abstract class AbstractCookieJarTestCase
10+
{
11+
12+
private CookieJar cookieJar;
13+
14+
@BeforeSuite
15+
public final void setUp()
16+
{
17+
cookieJar = createCookieJar();
18+
}
19+
20+
protected abstract CookieJar createCookieJar();
21+
22+
@AfterSuite
23+
public final void tearDown()
24+
{
25+
cookieJar = null;
26+
}
27+
28+
@Test
29+
public void myCharmingCookieJarTest()
30+
{
31+
assertNotNull( cookieJar );
32+
}
33+
34+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.ning.http.client.cookiejar;
2+
3+
public final class InMemoryCookieJarTestcase
4+
extends AbstractCookieJarTestCase
5+
{
6+
7+
@Override
8+
protected CookieJar createCookieJar()
9+
{
10+
return new InMemoryCookieJar();
11+
}
12+
13+
}

0 commit comments

Comments
 (0)