Beispiel #1
0
        public void NaoDeveDobrarCasoNaoHajaLanceAnterior()
        {
            Leilao leilao = new CriadorDeLeilao().Para("Macbook Pro 15").Constroi();

            leilao.DobraLance(steveJobs);

            Assert.AreEqual(0, leilao.Lances.Count);
        }
Beispiel #2
0
        public void DeveDobrarUltimoLance()
        {
            Leilao leilao = new CriadorDeLeilao().Para("Macbook Pro 15")
                            .Lance(steveJobs, 2000)
                            .Lance(billGates, 3000)
                            .Constroi();

            leilao.DobraLance(steveJobs);

            Assert.AreEqual(4000, leilao.Lances[2].Valor, 0.00001);
        }