/// <summary> /// Runs a test on a geometry that returns a boolean value. /// </summary> /// <param name="aGeometry">The A geometry object.</param> /// <param name="bGeometry">The B geometry object.</param> /// <param name="testToRun">The name of the test to run.</param> private void RunBooleanReturnGeometryFunction(Geometry aGeometry, Geometry bGeometry, string testToRun) { // start the timer... _timer.Start(); // determine which test to run... switch(testToRun) { case "disjoint": // set the name of the operation in the TestResult... this._testResult.Operation = "A Disjoint B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.Disjoint(bGeometry); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; case "relate": // set the name of the operation in the TestResult... this._testResult.Operation = "A Relate B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.Relate(bGeometry, this._op.Arg3); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; case "equals": // set the name of the operation in the TestResult... this._testResult.Operation = "A Equals B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.Equals(bGeometry); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; case "intersects": // set the name of the operation in the TestResult... this._testResult.Operation = "A Intersects B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.Intersects(bGeometry); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; case "touches": // set the name of the operation in the TestResult... this._testResult.Operation = "A Touches B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.Touches(bGeometry); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; case "crosses": // set the name of the operation in the TestResult... this._testResult.Operation = "A Crosses B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.Crosses(bGeometry); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; case "within": // set the name of the operation in the TestResult... this._testResult.Operation = "A Within B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.Within(bGeometry); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; case "contains": // set the name of the operation in the TestResult... this._testResult.Operation = "A Contains B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.Contains(bGeometry); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; case "overlaps": // set the name of the operation in the TestResult... this._testResult.Operation = "A Overlaps B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.Overlaps(bGeometry); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; case "equalstopology": // set the name of the operation in the TestResult... this._testResult.Operation = "A EqualsTopology B"; // call the method on the geometry and store the result... this._testResult.PredicateResult = aGeometry.EqualsTopology(bGeometry); // set the string value of the predicate result for comparison... this._testResult.SetPredicateResultString(); // test for pass or fail... TestForPassFailBooleanResult(); break; default: break; } // stop the timer... _timer.Stop(); this._testResult.TestDuration = _timer.Seconds; }