示例#1
0
 @Test
 public void testSet_GetInstanceOfNewCliTemplate() throws Exception {
   //        Assert.assertEquals(TelnetUtils.getInstanceOfNewCliTemplate(),null);//test null
   String instanceOfNewCliTemplate = new String("test");
   TelnetUtils.setInstanceOfNewCliTemplate(instanceOfNewCliTemplate);
   Assert.assertTrue(TelnetUtils.getInstanceOfNewCliTemplate().equals("test"));
 }
示例#2
0
  @Test
  public void testConfigL3vpnOnDeviceByCli() throws Exception {
    String deviceName = new String("deviceNamePE1");
    String clearOldConfigString = new String("clearOldConfigString");
    String cliExecutionSequences = new String("cliExecutionSequences");

    telnetUtils.configL3vpnOnDeviceByCli(deviceName, clearOldConfigString, cliExecutionSequences);

    Assert.assertTrue(!TelnetUtils.isConfigOver());
    Assert.assertEquals(TelnetUtils.getInstanceOfClearCliTemplate(), "clearOldConfigString");
    Assert.assertEquals(TelnetUtils.getInstanceOfNewCliTemplate(), "cliExecutionSequences");
    Assert.assertEquals(TelnetUtils.getCurrentDeviceName(), "deviceNamePE1");
  }