Esempio n. 1
0
        public void Are_Queries_Response_Valid()
        {
            var result = Extract(FileData);

            Business.StraightforwardAlgorithm.Algorithm alg = new Business.StraightforwardAlgorithm.Algorithm(result, result.Scenarios.First().Value,
                                                                                                              result.Sentences, null);
            var results = alg.FindModels();

            Assert.Equal(2, results.Count);
            Assert.Equal(false, results[0].Response);
            Assert.Equal(true, results[1].Response);
        }
Esempio n. 2
0
        public void Is_Scenario_Ever_Executable()
        {
            var modelSaver = new SimpleModelSaver();
            var result     = Extract(FileData);

            Business.StraightforwardAlgorithm.Algorithm alg = new Business.StraightforwardAlgorithm.Algorithm(result, result.Scenarios.First().Value,
                                                                                                              new List <Sentence <int> >()
            {
                new Sentence <int> .EverExecutable(result.Scenarios.FirstOrDefault().Value)
            }, modelSaver);
            alg.FindModels();
            Assert.Equal(10, modelSaver.SavedModels.Count);
        }