`
oywl2008
  • 浏览: 1005882 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

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
		//	};
	}

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics