Пример #1
0
        private bool GeneratePaths(List <Concurrent <int, int, int> .CommandResult> i)
        {
            var sut          = new Concurrent <int, int, int>(() => 1, 5);
            var correctState = new Concurrent <int, int, int> .CurrentState(true, 1);

            return(sut.HasValidPath(i, (r, s) => correctState, correctState).Valid);
        }
Пример #2
0
        public void DegenerateCaseComplates()
        {
            const int generationSize = 17;
            var       gen            = AlwaysTrueCommandResult(generationSize).Sample(1, 1).First();

            gen.Add(new Concurrent <bool, bool, bool> .CommandResult(new Concurrent <bool, bool, bool> .ClientCommand(2, new BoolIdentity()), false));

            var sut    = new Concurrent <bool, bool, bool>(() => true, 2);
            var result = sut.HasValidPath(gen, MatchTheResult, new Concurrent <bool, bool, bool> .CurrentState(true, true));

            Assert.False(result.Valid);
        }