//public override bool equals(object obj) {
        public bool equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }

            ServerConfiguration other = (ServerConfiguration)obj;

            /*return new EqualsBuilder().
             *              Append(detectionPoints, other.getDetectionPoints()).
             *              Append(correlationSets, other.getCorrelationSets()).
             *              Append(clientApplicationIdentificationHeaderName, other.getClientApplicationIdentificationHeaderName()).
             *              Append(clientApplications, other.getClientApplications()).
             *              isEquals();*/
            if (detectionPoints.Equals(other.getDetectionPoints()) &&
                correlationSets.Equals(other.getCorrelationSets()) &&
                clientApplicationIdentificationHeaderName.Equals(other.getClientApplicationIdentificationHeaderName()) &&
                clientApplications.Equals(other.getClientApplications()))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        /// <exception cref="InvalidOperationException"></exception>
        public void testConfigLoad()
        {
            ServerConfigurationReader reader        = new StaxServerConfigurationReader();
            ServerConfiguration       configuration = reader.read("/appsensor-server-config.xml", "/appsensor_server_config_2.0.xsd");

            //Assert.IsTrue("org.owasp.appsensor.analysis.ReferenceEventAnalysisEngine".Equals(configuration.getEventAnalysisEngineImplementation()));
            Assert.AreEqual("X-Appsensor-Client-Application-Name2", configuration.getClientApplicationIdentificationHeaderName());
        }