use of org.spockframework.mock.MockNature in project spock by spockframework.
the class SpockMockFactoryBean method getObject.
@Override
@SuppressWarnings("unchecked")
public T getObject() throws Exception {
if (instance == null) {
MockNature nature = MockNature.valueOf(mockNature.toUpperCase(Locale.ROOT));
instance = new DetachedMockFactory().createMock(name, targetClass, nature, Collections.<String, Object>emptyMap());
}
return instance;
}
Aggregations