Base code of using Junit and Jmock write unit test case

mock class and  mock interface

 

 

@Test
	public void testVerifyOTP() {
		
		Mockery contextclass = new JUnit4Mockery() {{
			setImposteriser(ClassImposteriser.INSTANCE);
		}};
		
		Mockery contextinterface = new JUnit4Mockery();
		contextclass.checking(new Expectations() {   
		{

			
		}});
		
		contextinterface.checking(new Expectations() {   
		{
					
		}});
		
		//	TokenMgtService tokenService = new TokenMgtService("test"){
		//	@Override
		//	};
	}

 

 

你可能感兴趣的:(unit test)