コード例 #1
0
ファイル: DeleteTunnelTest.java プロジェクト: ta-i/opennaas
 @BeforeClass
 public static void init() {
   action = new DeleteTunnelAction();
   action.setModelToUpdate(new ComputerSystem());
   helper = new ActionTestHelper();
   action.setParams(helper.newParamsInterfaceEthernet());
   helper = new ActionTestHelper();
   protocolsessionmanager = helper.getProtocolSessionManager();
 }
コード例 #2
0
ファイル: DeleteTunnelTest.java プロジェクト: ta-i/opennaas
  /**
   * Execute the action
   *
   * @throws IOException
   * @throws ActionException
   */
  @Test
  public void executeActionTest() throws IOException, ActionException {
    action.setModelToUpdate(getComputerSystem());
    // Add params
    GRETunnelService greTunnelService = getGRETunnelService();
    action.setParams(greTunnelService);

    ActionResponse response = action.execute(protocolsessionmanager);
    Assert.assertTrue(response.getActionID().equals(ActionConstants.DELETETUNNEL));

    org.opennaas.extensions.router.model.System computerSystem =
        (org.opennaas.extensions.router.model.System) action.getModelToUpdate();
    Assert.assertNotNull(computerSystem);
  }