Esempio n. 1
0
        public void NotaFiscalDeveSumarizarCorretamente()
        {
            var nf = new NotaFiscal(Guid.Empty, 1, "text");

            nf.AdicionarProduto(0, 1, 10);
            nf.AdicionarProduto(0, 1, 20);

            Assert.Equal(30, nf.ValorTotal);
        }
Esempio n. 2
0
        public void NotaFiscalNaoPodeReceberValorNegativoDeQuantidade()
        {
            var nf = new NotaFiscal(Guid.Empty, 1, "text");

            Assert.Throws <QuantidadeNegativaException>(() => nf.AdicionarProduto(0, -1, 0));
        }