public void TankanjeNaZacetkuNapacno() { Vozilo testno = new Vozilo(60, 5); double[] prva_pot = new double[] { 500 }; testno.Prevozi(prva_pot); double[] pot = new double[] { 0, 500, 0, 200, 0, 20 }; bool konca = testno.Prevozi(pot); Assert.AreEqual(konca, true); }
public void PotZTankanjem() { Vozilo testno = new Vozilo(60, 5); double[] pot = new double[] { 100, 50, 0 }; testno.Prevozi(pot); Assert.AreEqual(testno.PreostaliKilometri, 1200); }
public void ZmanjkaBencina() { Vozilo testno = new Vozilo(60, 5); double[] pot = new double[] { 100, 50, 0, 500, 400, 400 }; bool konca = testno.Prevozi(pot); Assert.AreEqual(konca, false); }
public void AliPrevozi() { Vozilo testno = new Vozilo(60, 5); double[] pot = new double[] { 100, 50, 0 }; bool konca = testno.Prevozi(pot); Assert.AreEqual(konca, true); }
public void TankanjeNaZacetkuPravilno() { Vozilo testno = new Vozilo(60, 5); double[] pot = new double[] { 0, 500, 0, 200, 0, 20 }; Action preveri = () => testno.Prevozi(pot); Assert.ThrowsException <Exception>(preveri); }
public void DvojnoTankanje() { Vozilo testno = new Vozilo(60, 5); double[] pot = new double[] { 100, 50, 0, 0, 500, 0, 20 }; Action preveri = () => testno.Prevozi(pot); Assert.ThrowsException <Exception>(preveri); }
public void NegativnaPot() { Vozilo testno = new Vozilo(60, 5); double[] pot = new double[] { 100, 50, 0, -5, 0, 500, 0, 20 }; Action preveri = () => testno.Prevozi(pot); Assert.ThrowsException <Exception>(preveri); }