net.avh4.framework.data.test
Class InMemoryDataStore

java.lang.Object
  extended by net.avh4.framework.data.test.InMemoryDataStore
All Implemented Interfaces:
DataStore

public class InMemoryDataStore
extends Object
implements DataStore

This can be used for unit tests where we can simulate persistence by adding a singleton instance of InMemoryDataStore to the DI container.


Constructor Summary
InMemoryDataStore()
           
 
Method Summary
 void clear()
           
 String get(String key)
           
 void put(String key, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryDataStore

public InMemoryDataStore()
Method Detail

put

public void put(String key,
                String value)
Specified by:
put in interface DataStore

get

public String get(String key)
Specified by:
get in interface DataStore

clear

public void clear()


Copyright © 2012. All Rights Reserved.