예제 #1
0
 @Test
 public void shouldBeAbleToAlterPrimitiveTypeDefaultValueClass() {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertCanModifyReturnValueForPrimitiveType(testObject);
 }
예제 #2
0
 @Test(expected = RuntimeException.class)
 public void shouldNotAllowToThrowACheckedExceptionOfWrongTypeInterface() throws Exception {
   TestInterface testObject = TestObject.createTestObject(TestInterface.class);
   assertDoesNotAllowWrongTypeException(testObject);
 }
예제 #3
0
 @Test(expected = RuntimeException.class)
 public void shouldThrowExceptionIfSettingAReturnValueOfWrongTypeClass() {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertExceptionThrownIfReturnValueHasWrongType(testObject);
 }
예제 #4
0
 @Test(expected = RuntimeException.class)
 public void shouldBeAbleToSetExceptionOnVoidMethodClass() {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertThrowOnVoidMethod(testObject);
 }
예제 #5
0
 @Test
 public void shouldReturnTheRecorderReturnValueClass() {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertReturnRecordedValue(testObject);
 }
예제 #6
0
 @Test(expected = IllegalArgumentException.class)
 public void recordThrowExceptionShouldThrowExceptionClass() {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertRecodedExceptionThrown(testObject);
 }
예제 #7
0
 @Test
 public void shouldReturnDefaultPrimitiveValueIfNoRecordingForClass() {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertDefaultPrimitiveTypeReturnValues(testObject);
 }
예제 #8
0
 @Test
 public void shouldReturnNullIfNoRecordingForClass() {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertDefaultObjectReturnValue(testObject);
 }
예제 #9
0
 @Test
 public void nullShouldBeMatchedClass() throws Exception {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertNullParametersMatched(testObject);
 }
예제 #10
0
 @Test(expected = RuntimeException.class)
 public void voidMethodWithParamMatchingClass() throws Exception {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertVoidMethodWithParamMatching(testObject);
 }
예제 #11
0
 @Test
 public void useCustomMatcherClass() throws Exception {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertUseCustomMatcher(testObject);
 }
예제 #12
0
 @Test(expected = RuntimeException.class)
 public void reportInvalidNumberOfMatchersClass() throws Exception {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertReportWrongNumberOfMatchers(testObject);
 }
예제 #13
0
 @Test
 public void useLooseArgumentMatchingWithEqMatcherClass() throws Exception {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertEqMatcher(testObject);
 }
예제 #14
0
 @Test
 public void useLooseArgumentMatchingInterface() throws Exception {
   TestInterface testObject = TestObject.createTestObject(TestInterface.class);
   assertUseLooseArgumentMatching(testObject);
 }
예제 #15
0
 @Test
 public void useArgumentMatchingForRecordingBehaviorClass() throws Exception {
   TestInterface testObject = TestObject.createTestObject(TestClass.class);
   assertRecordingUseArgumentMatching(testObject);
 }