示例#1
0
 @Test
 public void testSet_GetInstanceOfClearCliTemplate() throws Exception {
   //        Assert.assertTrue(TelnetUtils.getInstanceOfClearCliTemplate() == null);//test null
   String instanceOfClearCliTemplate = new String("test");
   TelnetUtils.setInstanceOfClearCliTemplate(instanceOfClearCliTemplate);
   Assert.assertTrue(TelnetUtils.getInstanceOfClearCliTemplate().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");
  }