- private static Logger logger = FlexLogger.getLogger(BRMSDictionaryControllerTest.class);
- private static CommonClassDao commonClassDao;
- private String jsonString = null;
- private HttpServletRequest request = null;
- private BRMSDictionaryController controller = null;
- private MockHttpServletResponse response = null;
-
- @Before
- public void setUp() throws Exception {
- logger.info("setUp: Entering");
- commonClassDao = Mockito.mock(CommonClassDao.class);
- UserInfo userInfo = new UserInfo();
- userInfo.setUserLoginId("testUserId");
- userInfo.setUserName("John");
- when(commonClassDao.getEntityItem(UserInfo.class, "userLoginId", "testing")).thenReturn(userInfo);
- List<String> brms = new ArrayList<String>();
- brms.add("BRMS-Model");
- when(commonClassDao.getDataByColumn(BRMSParamTemplate.class, "name")).thenReturn(brms);
- doNothing().when(commonClassDao).delete(new BRMSParamTemplate());
- doNothing().when(commonClassDao).save(new BRMSParamTemplate());
- controller = new BRMSDictionaryController();
- request = Mockito.mock(HttpServletRequest.class);
- response = new MockHttpServletResponse();
- logger.info("setUp: exit");
- }
+ private static Logger logger = FlexLogger.getLogger(BRMSDictionaryControllerTest.class);
+ private static CommonClassDao commonClassDao;
+ private String jsonString = null;
+ private HttpServletRequest request = null;
+ private BRMSDictionaryController controller = null;
+ private MockHttpServletResponse response = null;