예제 #1
0
        public void Selection()
        {
            var contradictionSpec = new Contradiction<int>();

            Assert.That(contradictionSpec.IsSatisfiedBy(Int32.MinValue), Is.False);
            Assert.That(contradictionSpec.IsSatisfiedBy(1), Is.False);
            Assert.That(contradictionSpec.IsSatisfiedBy(0), Is.False);
            Assert.That(contradictionSpec.IsSatisfiedBy(-1), Is.False);
            Assert.That(contradictionSpec.IsSatisfiedBy(Int32.MaxValue), Is.False);
        }
예제 #2
0
        public void Criteria()
        {
            var contradiction = new Contradiction<int>();
            var contradictionCriteria = contradiction.Criteria;

            Assert.That(contradictionCriteria.Body, Is.AssignableTo<ConstantExpression>());

            var constant = (ConstantExpression)contradictionCriteria.Body;

            Assert.That(constant.NodeType, Is.EqualTo(ExpressionType.Constant));
            Assert.That(constant.Value, Is.False);

            ExpressionWriter.Write(contradictionCriteria);
        }
예제 #3
0
        public void ReadModelBase()
        {
            var fileDialog = new OpenFileDialog();

            fileDialog.ShowDialog();

            if (fileDialog.FileName != "")
            {
                _gatheredBases.ModelsBase.ModelList = new List <Model>();

                _gatheredBases.ModelsBase.ReadModels(fileDialog.FileName);
                _viewModel._currentModelBasePath        = fileDialog.FileName;
                _viewModel.ButtonsLogic.ModelBaseOpened = true;
            }
            Contradiction.CheckContradictionWIthModelsAndRulebase(_gatheredBases);
        }
예제 #4
0
 public void CheckContradictionBetweenModelsAndRulebase()
 {
     Contradiction.CheckContradictionWIthModelsAndRulebase(_bases);
 }
예제 #5
0
 public void CheckContradictionWithConstrains()
 {
     Contradiction.CheckContradictionWithConstarinsMethod(_bases);
 }
예제 #6
0
 public void ReportAboutOutsideContradiction()
 {
     Contradiction.ReportAboutContradictionInRules(_bases, _viewModel);
 }
예제 #7
0
 public void CheckOutsideContradiction()
 {
     Contradiction.CheckOutsideContradiction(_bases, true);
 }
예제 #8
0
 public void TestOutsideContradictionMethod()
 {
     Contradiction.CheckOutsideContradiction(bases);
 }