You have a code like this:
@RunWith(MockitoJUnitRunner.class)
@ContextConfiguration(locations = "classpath*:business-context-test.xml")
public class SMSGatewayTest {
..
..
}
Are you really using MockitoJUnitRunner because I no longer see any mockery of the class in me.
JUnit
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath*:business-context-test.xml")
public class SMSGatewayTest {
..
..
}
-
@RunWith (SpringJUnit4ClassRunner.class) , @ContextConfiguration (..) , .
, @RunWith (SpringJUnit4ClassRunner.class) - SMSGateway. , SMSGateway, @ContextConfiguration (locations = "classpath *: business-context-test.xml" )
"smsGateway" SMSGateway. @RunWith (MockitoJUnitRunner.class), , , , spring . MockitoJUnitRunner.class, Mockito . , MockitoJUnitRunner .
, Mockito, JUnit Spring .
http://www.alexecollins.com/tutorial-junit-rule/. , "@Runwith" "@ContextConfiguration" .