Skip to content

Instantly share code, notes, and snippets.

@mgenov
Created May 3, 2011 08:45
Show Gist options
  • Save mgenov/953026 to your computer and use it in GitHub Desktop.
Save mgenov/953026 to your computer and use it in GitHub Desktop.
LearnToRegisterNewCustomersTest
public class LearnToRegisterNewCustomersTest {
private ProvisioningServicePortType service;
@Before
public void cleanUpExistingCustomers() throws ServiceException, RemoteException {
ProvisioningService locator = new ProvisioningServiceLocator();
service = locator.getProvisioningServicePort();
((Stub) service).setUsername("xxxx");
((Stub) service).setPassword("xxxx");
// we have to clean existing customer, to put testing environment in a clean state
service.deleteCustomer("test_123");
}
@Test
public void addNewCustomer() throws ServiceException, RemoteException {
assertNotNull(service.createCustomer("test_123", "2", "0000", "0000"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment