コード例 #1
0
  @Test
  public void testConfigure() {
    Assert.assertEquals(adapter.home, home);
    //    Assert.assertEquals(adapter.adminPort, port);
    Assert.assertEquals(adapter.userName, username);
    Assert.assertEquals(adapter.getPassword(), password);

    ConfigurationFactory configFactory = new DefaultConfigurationFactory();
    ContainerFactory containerFactory = new DefaultContainerFactory();

    Container container =
        adapter.getContainer(configFactory, containerFactory, adapter.getContainerId());
    Assert.assertNotNull(container);
  }
コード例 #2
0
  @Test
  public void testConfigureRemote() {
    Assert.assertNull("Expexted adapter.home to be null", remoteAdapter.home);
    //     Assert.assertEquals(remoteAdapter.adminPort, adminPort);
    Assert.assertEquals(remoteAdapter.userName, username);
    Assert.assertEquals(remoteAdapter.getPassword(), password);
    Assert.assertEquals(remoteAdapter.hostname, hostname);

    ConfigurationFactory configFactory = new DefaultConfigurationFactory();
    ContainerFactory containerFactory = new DefaultContainerFactory();

    Container container =
        remoteAdapter.getContainer(configFactory, containerFactory, remoteAdapter.getContainerId());
    Assert.assertNotNull(container);
  }