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); } }
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)); } }
public ModelTestAssertion(TestAssertion asserrtion) { Title = ToolsEnum.EnumToString(asserrtion); TestAssertion = asserrtion; }
public AssertionDescriptionSpec_AssertionWithAssertionObject() { Expected = new TestAssertion(5, 3); }