Esempio n. 1
0
        public void ReturnDangerousAndExpensivePoisonTest()
        {
            var query = new DangerousPoisonQuery(true).And(new CostlyPoisonQuery(true));

            var result = TestDataHelper.Samples
                         .AsQueryable()
                         .Where(query.ToExpression());

            result.Should()
            .NotBeNullOrEmpty()
            .And
            .HaveCount(2);
        }
Esempio n. 2
0
        public void ReturnNotDangerousSamplesTest()
        {
            var query = new DangerousPoisonQuery(false);

            var result = TestDataHelper.Samples
                         .AsQueryable()
                         .Where(query.ToExpression());

            result.Should()
            .NotBeNullOrEmpty()
            .And
            .HaveCount(3);
        }
Esempio n. 3
0
        public void ReturnDangerousAndCheapPoisonTest()
        {
            var query = new DangerousPoisonQuery(true).And(new CostlyPoisonQuery(false));

            var result = TestDataHelper.Samples
                         .AsQueryable()
                         .Where(query.ToExpression());

            result.Should()
            .NotBeNullOrEmpty()
            .And
            .HaveCount(1);

            result.FirstOrDefault()
            .Name
            .Should()
            .Be("DeadlyCheapPoison");
        }