예제 #1
0
        public void NaoDeveDobrarCasoNaoHajaLanceAnterior()
        {
            Leilao leilao = new CriadorDeLeilao().Para("Macbook Air")
                            .Constroi();

            leilao.DobraLance(jobs);

            Assert.AreEqual(0, leilao.Lances.Count);
        }
예제 #2
0
        public void DeveDobrarUltimoLancePropostoPeloUsuario()
        {
            Leilao leilao = new CriadorDeLeilao().Para("Macbook Air")
                            .Lance(jobs, 2000.0)
                            .Lance(wozniak, 1000.0)
                            .Constroi();

            leilao.DobraLance(jobs);

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