Issue #273:Caching Patterns [new pattern]
This commit is contained in:
41
caching/src/test/java/com/wssia/caching/AppTest.java
Normal file
41
caching/src/test/java/com/wssia/caching/AppTest.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package test.java.com.wssia.caching;
|
||||
|
||||
import main.java.com.wssia.caching.App;
|
||||
import main.java.com.wssia.caching.AppManager;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* Application test
|
||||
*
|
||||
*/
|
||||
public class AppTest {
|
||||
App app;
|
||||
|
||||
/**
|
||||
* Setup of application test includes: initializing DB connection and cache size/capacity.
|
||||
*/
|
||||
@Before
|
||||
public void setUp() {
|
||||
AppManager.init();
|
||||
AppManager.initCacheCapacity(3);
|
||||
app = new App();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadAndWriteThroughStrategy() {
|
||||
app.useReadAndWriteThroughStrategy();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadThroughAndWriteAroundStrategy() {
|
||||
app.useReadThroughAndWriteAroundStrategy();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadThroughAndWriteBehindStrategy() {
|
||||
app.useReadThroughAndWriteBehindStrategy();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user