Esempio n. 1
0
            public void ThrowsWhenCandidateIsNull()
            {
                // Arrange
                ILogger <FantasticReasonService> logger = Substitute.For <ILogger <FantasticReasonService> >();
                FantasticReasonService           uut    = CreateService(db: _db, logger: logger);

                // Act
                Action act = () => uut.GetReasonsByCandidate(null);

                // Assert
                act.Should().Throw <Exception>();
                logger.ReceivedCalls().Should().ContainSingle()
                .Which.GetArguments().Should().Contain(LogLevel.Error);
            }