| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- -------------------------------------------------------------------------------
- Test set: com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest
- -------------------------------------------------------------------------------
- Tests run: 6, Failures: 0, Errors: 6, Skipped: 0, Time elapsed: 0.046 s <<< FAILURE! - in com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest
- resolveShipType_deliveryMethod3_requiresExplicitShipType Time elapsed: 0 s <<< ERROR!
- java.lang.NullPointerException
- at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.resolveShipType_deliveryMethod3_requiresExplicitShipType(ProductOrderServiceFulfillmentMultiModeTest.java:247)
- ship_local_syncsWechatWithLogisticsType2 Time elapsed: 0.031 s <<< ERROR!
- org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
- Misplaced or misused argument matcher detected here:
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- You cannot use argument matchers outside of verification or stubbing.
- Examples of correct usage of argument matchers:
- when(mock.get(anyInt())).thenReturn(null);
- doThrow(new RuntimeException()).when(mock).someVoidMethod(any());
- verify(mock).someMethod(contains("foo"))
- This message may appear after an NullPointerException if the last matcher is returning an object
- like any() but the stubbed method signature expect a primitive argument, in this case,
- use primitive alternatives.
- when(mock.get(any())); // bad use, will raise NPE
- when(mock.get(anyInt())); // correct usage use
- Also, this error might show up because you use argument matchers with methods that cannot be mocked.
- Following methods *cannot* be stubbed/verified: final/private/equals()/hashCode().
- Mocking methods declared on non-public parent classes is not supported.
- at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.setUp(ProductOrderServiceFulfillmentMultiModeTest.java:37)
- ship_express_requiresTrackingAndCompany Time elapsed: 0.004 s <<< ERROR!
- java.lang.NullPointerException
- at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.ship_express_requiresTrackingAndCompany(ProductOrderServiceFulfillmentMultiModeTest.java:85)
- ship_selfPickup_syncsWechatWithLogisticsType4 Time elapsed: 0.001 s <<< ERROR!
- org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
- Misplaced or misused argument matcher detected here:
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- You cannot use argument matchers outside of verification or stubbing.
- Examples of correct usage of argument matchers:
- when(mock.get(anyInt())).thenReturn(null);
- doThrow(new RuntimeException()).when(mock).someVoidMethod(any());
- verify(mock).someMethod(contains("foo"))
- This message may appear after an NullPointerException if the last matcher is returning an object
- like any() but the stubbed method signature expect a primitive argument, in this case,
- use primitive alternatives.
- when(mock.get(any())); // bad use, will raise NPE
- when(mock.get(anyInt())); // correct usage use
- Also, this error might show up because you use argument matchers with methods that cannot be mocked.
- Following methods *cannot* be stubbed/verified: final/private/equals()/hashCode().
- Mocking methods declared on non-public parent classes is not supported.
- at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.setUp(ProductOrderServiceFulfillmentMultiModeTest.java:37)
- ship_virtual_rejectsManualShipAndIdempotent Time elapsed: 0.005 s <<< ERROR!
- java.lang.NullPointerException
- at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.ship_virtual_rejectsManualShipAndIdempotent(ProductOrderServiceFulfillmentMultiModeTest.java:168)
- autoShipVirtualOrder_onPaySuccess Time elapsed: 0.001 s <<< ERROR!
- org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
- Misplaced or misused argument matcher detected here:
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- -> at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.stubBuyerWithOpenid(ProductOrderServiceFulfillmentMultiModeTest.java:71)
- You cannot use argument matchers outside of verification or stubbing.
- Examples of correct usage of argument matchers:
- when(mock.get(anyInt())).thenReturn(null);
- doThrow(new RuntimeException()).when(mock).someVoidMethod(any());
- verify(mock).someMethod(contains("foo"))
- This message may appear after an NullPointerException if the last matcher is returning an object
- like any() but the stubbed method signature expect a primitive argument, in this case,
- use primitive alternatives.
- when(mock.get(any())); // bad use, will raise NPE
- when(mock.get(anyInt())); // correct usage use
- Also, this error might show up because you use argument matchers with methods that cannot be mocked.
- Following methods *cannot* be stubbed/verified: final/private/equals()/hashCode().
- Mocking methods declared on non-public parent classes is not supported.
- at com.etotem.cfc.service.ProductOrderServiceFulfillmentMultiModeTest.setUp(ProductOrderServiceFulfillmentMultiModeTest.java:37)
|