public void testConfigLoad() { ClientConfigurationReader reader = new StaxClientConfigurationReader(); ClientConfiguration configuration = reader.read("/appsensor-client-config.xml", "/appsensor_client_config_2.0.xsd"); // Assert.IsTrue("org.owasp.appsensor.event.LocalEventManager".Equals(configuration.getEventManagerImplementation())); // Assert.IsTrue("org.owasp.appsensor.response.LocalResponseHandler".Equals(configuration.getResponseHandlerImplementation())); // Assert.IsTrue("org.owasp.appsensor.response.NoopUserManager".Equals(configuration.getUserManagerImplementation())); Assert.IsTrue("rest".Equals(configuration.getServerConnection().getType())); Assert.IsTrue("https".Equals(configuration.getServerConnection().getProtocol())); Assert.IsTrue("www.owasp.org".Equals(configuration.getServerConnection().getHost())); Assert.IsTrue(5000 == configuration.getServerConnection().getPort()); Assert.IsTrue("/appsensor/v2/api/".Equals(configuration.getServerConnection().getPath())); }
public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } ClientConfiguration other = (ClientConfiguration)obj; /*return new EqualsBuilder(). * Append(serverConnection, other.getServerConnection()). * isEquals();*/ if (serverConnection.Equals(other.getServerConnection())) { return(true); } else { return(false); } }