Search in sources :

Example 6 with MockType

use of org.easymock.MockType in project easymock by easymock.

the class MockTypeTest method fromMockBuilderClassWithName.

@Test
public void fromMockBuilderClassWithName() {
    MockTypeTest mock = builder.addMockedMethod("toString").createMock("test", MockType.STRICT);
    MockType type = MocksControl.getControl(mock).getType();
    assertEquals(MockType.STRICT, type);
    assertEquals("test", mock.toString());
}
Also used : MockType(org.easymock.MockType) Test(org.junit.Test)

Example 7 with MockType

use of org.easymock.MockType in project easymock by easymock.

the class MockTypeTest method fromEasyMockClassWithName.

@Test
public void fromEasyMockClassWithName() {
    IMethods mock = EasyMock.createMock("test", MockType.STRICT, IMethods.class);
    MockType type = MocksControl.getControl(mock).getType();
    assertEquals(MockType.STRICT, type);
    assertEquals("test", mock.toString());
}
Also used : MockType(org.easymock.MockType) Test(org.junit.Test)

Aggregations

MockType (org.easymock.MockType)7 Test (org.junit.Test)6