Ejemplo n.º 1
0
        public void Emprestimo_CalcularMulta_DeveFuncionar()
        {
            IList <Livro> ListaLivros = new List <Livro>();

            ListaLivros.Add(LivroMock.Object);
            Emprestimo emprestimo = ObjectMother.ObterEmprestimoValido(ListaLivros);

            emprestimo.CalcularMulta(DateTime.Now.AddDays(-5));
            emprestimo.Multa.Should().BeGreaterThan(0);
        }
Ejemplo n.º 2
0
        public void Venda_SemMulta_DeveSerValido()
        {
            Emprestimo emprestimo = ObjectMother.ObterEmprestimoValido();

            emprestimo.Id    = 1;
            emprestimo.Livro = _mockLivro.Object;

            emprestimo.CalcularMulta(DateTime.Now.AddDays(2));

            emprestimo.Multa.Should().Be(0);
        }