Created
August 18, 2013 19:00
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
void testServiceStoresTheValues() { | |
//given | |
def mockForDataStore = new MockFor(Datastore) | |
mockForDataStore.demand.open { true } | |
mockForDataStore.demand.storeField { k, v -> true } | |
def mockDataStore = mockForDataStore.proxyInstance() | |
def service = new Service(mockDataStore) | |
//when | |
service.processEntry([someKey:"someValue"]) | |
//then | |
mockForDataStore.verify mockDataStore | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment