Skip to content

Instantly share code, notes, and snippets.

@chbatey
Created August 18, 2013 19:00
@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