Beispiel #1
0
 public void caixasVazias()
 {
     var calculo = new Calculo("", "", "");
     Assert.AreEqual(calculo.getA(), 0);
     Assert.AreEqual(calculo.getB(), 0);
     Assert.AreEqual(calculo.getC(), 0);
 }
Beispiel #2
0
 public void testeInicial1()
 {
     var calculo = new Calculo("5", "2", "1");
     Assert.AreNotEqual(calculo.getA(), 3);
     Assert.AreNotEqual(calculo.getB(), 3);
     Assert.AreNotEqual(calculo.getC(), 3);
 }
Beispiel #3
0
 public void positivosDecimal()
 {
     var calculo = new Calculo("5987654,3", "2,47689", "1,689065");
     Assert.AreEqual(calculo.getA(), 5987654, 3);
     Assert.AreEqual(calculo.getB(), 2, 47689);
     Assert.AreEqual(calculo.getC(), 1, 689065);
 }
Beispiel #4
0
 public void positivos()
 {
     var calculo = new Calculo("5", "2", "1");
     Assert.AreEqual(calculo.getA(), 5);
     Assert.AreEqual(calculo.getB(), 2);
     Assert.AreEqual(calculo.getC(), 1);
 }
Beispiel #5
0
 public void negativosDecimal()
 {
     var calculo = new Calculo("-5987654,3", "-2,47689", "-1,689065");
     Assert.AreEqual(calculo.getA(), -5987654, 3);
     Assert.AreEqual(calculo.getB(), -2, 47689);
     Assert.AreEqual(calculo.getC(), -1, 689065);
 }
Beispiel #6
0
 public void negativos()
 {
     var calculo = new Calculo("-5", "-2", "-1");
     Assert.AreEqual(calculo.getA(), -5);
     Assert.AreEqual(calculo.getB(), -2);
     Assert.AreEqual(calculo.getC(), -1);
 }