Beispiel #1
0
 public void Load(ModuleTestParameters testParameters)
 {
     using (var moduleLoader = new ModuleLoader(testParameters.ModuleName))
     {
         var test = moduleLoader.GetBATest();
         Assert.NotNull(test);
     }
 }
Beispiel #2
0
        public void JacobianRunsMultipleTimes(ModuleTestParameters testParameters)
        {
            using (var moduleLoader = new ModuleLoader(testParameters.ModuleName))
            {
                var module = moduleLoader.GetBATest();
                Assert.NotNull(module);

                // Read instance
                var input = DataLoader.ReadBAInstance("batest.txt");

                module.Prepare(input);

                Assert.True(Utils.CanObjectiveRunMultipleTimes(module.CalculateJacobian));
            }
        }
Beispiel #3
0
        public void ObjectiveRunsMultipleTimes(ModuleTestParameters testParameters)
        {
            using (var moduleLoader = new ModuleLoader(testParameters.ModuleName))
            {
                var module = moduleLoader.GetGMMTest();
                Assert.NotNull(module);

                // Read instance
                var input = DataLoader.ReadGMMInstance("gmmtest.txt", false);

                module.Prepare(input);

                Assert.True(Utils.CanObjectiveRunMultipleTimes(module.CalculateObjective));
            }
        }
Beispiel #4
0
        public void ObjectiveComplicatedRunsMultipleTimes(ModuleTestParameters testParameters)
        {
            using (var moduleLoader = new ModuleLoader(testParameters.ModuleName))
            {
                var module = moduleLoader.GetHandTest();
                Assert.NotNull(module);

                // Read instance
                var input = DataLoader.ReadHandInstance("hand_complicatedtest.txt", true);

                module.Prepare(input);

                Assert.True(Utils.CanObjectiveRunMultipleTimes(module.CalculateObjective));
            }
        }
Beispiel #5
0
 public void ObjectiveMultipleTimesCalculationCorrectness(ModuleTestParameters testParameters)
 {
     CheckObjectiveCalculation(testParameters.ModuleName, testParameters.Tolerance, times: 3);
 }
Beispiel #6
0
 public void JacobianMultipleTimesCalculationCorrectness(ModuleTestParameters testParameters)
 {
     CheckJacobianCalculation(testParameters.ModuleName, testParameters.Tolerance, times: 3);
 }
Beispiel #7
0
 public void JacobianComplicatedCalculationCorrectness(ModuleTestParameters testParameters)
 {
     CheckComplicatedJacobianCalculation(testParameters.ModuleName, testParameters.Tolerance, times: 1);
 }
Beispiel #8
0
 public void ObjectiveSimpleCalculationCorrectness(ModuleTestParameters testParameters)
 {
     CheckSimpleObjectiveCalculation(testParameters.ModuleName, testParameters.Tolerance, times: 1);
 }