예제 #1
0
        public void BeTrueWithWomanThreat()
        {
            var woman = TD.WomanThreat;

            mockThreatIdentificationService = new Mock <IThreatIdentificationService>(MockBehavior.Strict);
            mockThreatIdentificationService.Setup(p => p.InvestigateThreat(woman)).Returns(true);

            terminationService = new TerminationService(mockThreatIdentificationService.Object);
            var result = terminationService.IfTargetHumanInvestigateFurther(woman);

            result.Should().BeTrue();

            mockThreatIdentificationService.VerifyAll();
        }
예제 #2
0
        public void BeFalseWithCatThreat()
        {
            var cat = TD.CatThreat;

            mockThreatIdentificationService = new Mock <IThreatIdentificationService>(MockBehavior.Strict);
            mockThreatIdentificationService.Setup(p => p.InvestigateThreat(cat)).Returns(false);

            terminationService = new TerminationService(mockThreatIdentificationService.Object);
            var result = terminationService.IfTargetHumanInvestigateFurther(cat);

            result.Should().BeFalse();

            mockThreatIdentificationService.VerifyAll();
        }