Ejemplo n.º 1
0
        private static string GetTestAssertionString(TestAssertion test_assertion)
        {
            switch (test_assertion)
            {
            case TestAssertion.MeasurementsIndependant: return("Measurements are independant");

            case TestAssertion.MeasurementsPaired: return("Measurements are paired");

            case TestAssertion.SamplesIndependant: return("SampleIndependant");

            case TestAssertion.SamplesLabelCorrelationIsEqual: return("SamplesCorrelationEqual");

            case TestAssertion.SamplesDrawnFromBinominalDistribution: return("SamplesDrawnFromBinominalDistribution");

            case TestAssertion.SamplesDrawnFromNormalDistribution: return("SamplesDrawnFromNormalDistribution");

            case TestAssertion.SamplesHaveNoCorrelation: return("SamplesHaveNoCorrelation");

            case TestAssertion.SamplesHaveEqualMeans: return("SamplesHaveEqualMeans");

            case TestAssertion.SamplesHaveEqualVariances: return("SamplesHaveEqualVariances");

            default:
                throw new Exception("Unknown test assertion: " + test_assertion);
            }
        }
Ejemplo n.º 2
0
        public ModelTest(ATestTwoSample test,
                         string applicability,
                         double test_statistic_value,
                         double p_value)
        {
            this.Title                    = test.TestName;
            this.Applicability            = applicability;
            this.null_hypothesis          = test.NullHypothesis;
            this.NullHypothesisString     = ToolsEnum.EnumToString(test.NullHypothesis);
            this.TestStatisticName        = test.TestStatisticName;
            this.test_statistic_value     = test_statistic_value;
            this.TestStatisticValueString = test_statistic_value.ToString("0.####");
            this.p_value                  = p_value;
            this.PValueString             = p_value.ToString("0.####");

            this.TestRequirementList = new ObservableCollection <ModelTestRequirement>();
            foreach (TestRequirement requirement in test.Requirements)
            {
                TestRequirementList.Add(new ModelTestRequirement(requirement));
            }

            this.TestAssumptionist = new ObservableCollection <ModelTestAssertion>();
            foreach (TestAssertion assertion in test.Assumptions)
            {
                TestAssumptionist.Add(new ModelTestAssertion(assertion));
            }
        }
Ejemplo n.º 3
0
 public ModelTestAssertion(TestAssertion asserrtion)
 {
     Title         = ToolsEnum.EnumToString(asserrtion);
     TestAssertion = asserrtion;
 }
Ejemplo n.º 4
0
 public AssertionDescriptionSpec_AssertionWithAssertionObject()
 {
     Expected = new TestAssertion(5, 3);
 }