public void AutoModositas() { //arrange var sut = new AdatEleres(); //act var auto = new Auto() { Id = 1, Rendszam = "ABC123", Tipus = new AutoTipus() { Id = 2 }, Alvazszam = "UjAlvazSzam", Motorszam = "MotorNo1", ElsoForgalombaHelyezes = new DateTime(2018, 11, 26), AutomataValto = true, KmOraAllas = 100000, Uzemanyag = UzemanyagEnum.Benzin }; sut.UpdateAuto(auto); //assert string sor = File.ReadLines("autok.txt").First(); Assert.AreEqual("1;ABC123;2;UjAlvazSzam;MotorNo1;20181126;1;100000;0", sor); Init(); }
public void AutoModositas2() { var sut = new AdatEleres(); var auto = sut.GetAuto(2); auto.Rendszam = "KING01"; sut.UpdateAuto(auto); string sor = File.ReadLines("autok.txt").ToList()[1]; Assert.AreEqual("2;KING01;3;No2Alvaz;No2Motor;20180901;1;6500;1", sor); Init(); }