TaskFactory { @Deprecated public static IHmsTask getTask( TaskType taskType, HmsNode node ) { IHmsTask task = null; switch ( taskType ) { default: return task; } }  @Deprecated static IHmsTask getTask( TaskType taskType, HmsNode node ); static IHmsTask getTask( TaskType taskType, TaskResponse response ); static IHmsTask getTask( TaskType taskType, TaskResponse response, Object data );  }
@Test @Ignore public void testGetTask_HMSBootUpTask() { logger.info("[TS] : testGetTask_HMSBootUpTask"); TaskType taskType = TaskType.HMSBootUp; ServerNode sNode = new ServerNode("2","10.28.197.202","ADMIN","ADMIN"); sNode.setOsUserName("root"); sNode.setOsPassword("l@ni3r2o14"); sNode.setIbIpAddress("10.28.197.22"); IHmsTask result = TaskFactory.getTask(taskType, sNode); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_PowerDownServerTask() { logger.info("[TS] : testGetTask_PowerDownServerTask"); TaskType taskType = TaskType.PowerDownServer; ServerNode sNode = new ServerNode("2","10.28.197.202","ADMIN","ADMIN"); sNode.setOsUserName("root"); sNode.setOsPassword("l@ni3r2o14"); sNode.setIbIpAddress("10.28.197.22"); IHmsTask result = TaskFactory.getTask(taskType, sNode); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_PowerResetServerTask() { logger.info("[TS] : testGetTask_PowerResetServerTask"); TaskType taskType = TaskType.PowerResetServer; ServerNode sNode = new ServerNode("2","10.28.197.202","ADMIN","ADMIN"); sNode.setOsUserName("root"); sNode.setOsPassword("l@ni3r2o14"); sNode.setIbIpAddress("10.28.197.22"); IHmsTask result = TaskFactory.getTask(taskType, sNode); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_PowerUpServerTask() { logger.info("[TS] : testGetTask_PowerUpServerTask"); TaskType taskType = TaskType.PowerUpServer; ServerNode sNode = new ServerNode("2","10.28.197.202","ADMIN","ADMIN"); sNode.setOsUserName("root"); sNode.setOsPassword("l@ni3r2o14"); sNode.setIbIpAddress("10.28.197.22"); IHmsTask result = TaskFactory.getTask(taskType, sNode); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_DiscoverSwitchTask() { logger.info("[TS] : testGetTask_DiscoverSwitchTask"); TaskType taskType = TaskType.DiscoverSwitch; ServerNode sNode = new ServerNode("2","10.28.197.202","ADMIN","ADMIN"); sNode.setOsUserName("root"); sNode.setOsPassword("l@ni3r2o14"); sNode.setIbIpAddress("10.28.197.22"); IHmsTask result = TaskFactory.getTask(taskType, sNode); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test @Ignore public void testGetTask_MacAddressDiscoveryTask() { logger.info("[TS] : testGetTask_MacAddressDiscoveryTask"); TaskType taskType = TaskType.MacAddressDiscovery; ServerNode sNode = new ServerNode("2","10.28.197.202","ADMIN","ADMIN"); sNode.setOsUserName("root"); sNode.setOsPassword("l@ni3r2o14"); sNode.setIbIpAddress("10.28.197.22"); IHmsTask result = TaskFactory.getTask(taskType, sNode); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_HMSBootUp_TaskResponse() { logger.info("[TS] : testGetTask_HMSBootUp_TaskResponse"); TaskType taskType = TaskType.HMSBootUp; TaskResponse TR = new TaskResponse(new ServerNode("2","10.28.197.202","ADMIN","ADMIN")); IHmsTask result = TaskFactory.getTask(taskType, TR); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_PowerStatusServer_TaskResponse() { logger.info("[TS] : testGetTask_PowerStatusServer_TaskResponse"); TaskType taskType = TaskType.PowerStatusServer; TaskResponse TR = new TaskResponse(new ServerNode("2","10.28.197.202","ADMIN","ADMIN")); IHmsTask result = TaskFactory.getTask(taskType, TR); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_ValidateServerOS_TaskResponse() { logger.info("[TS] : testGetTask_ValidateServerOS_TaskResponse"); TaskType taskType = TaskType.ValidateServerOS; TaskResponse TR = new TaskResponse(new ServerNode("2","10.28.197.202","ADMIN","ADMIN")); IHmsTask result = TaskFactory.getTask(taskType, TR); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_ServerBoardInfo_TaskResponse() { logger.info("[TS] : testGetTask_PowerStatusServer_TaskResponse"); TaskType taskType = TaskType.ServerBoardInfo; TaskResponse TR = new TaskResponse(new ServerNode("2","10.28.197.202","ADMIN","ADMIN")); IHmsTask result = TaskFactory.getTask(taskType, TR); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_MacAddressDiscovery_TaskResponse() { logger.info("[TS] : testGetTask_ValidateServerOS_TaskResponse"); TaskType taskType = TaskType.MacAddressDiscovery; TaskResponse TR = new TaskResponse(new ServerNode("2","10.28.197.202","ADMIN","ADMIN")); IHmsTask result = TaskFactory.getTask(taskType, TR); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNotNull(result); }
@Test public void testGetTask_TaskAsNull_TaskResponse() { logger.info("[TS] : testGetTask_ValidateServerOS_TaskResponse"); TaskType taskType = TaskType.PowerStatusSwitch; TaskResponse TR = new TaskResponse(new ServerNode("2","10.28.197.202","ADMIN","ADMIN")); IHmsTask result = TaskFactory.getTask(taskType, TR); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNull(result); }
@Test public void testGetTask_PowerStatusSwitch_TaskResponse() { logger.info("[TS] : testGetTask_ValidateServerOS_TaskResponse"); TaskType taskType = TaskType.PowerStatusSwitch; TaskResponse TR = new TaskResponse(new ServerNode("2","10.28.197.202","ADMIN","ADMIN")); IHmsTask result = TaskFactory.getTask(taskType, TR); logger.info("[TS] : Expected Result : Not Null , Actual Result : "+result); assertNull(result); }