public void WaggonRepository_SaveAllChanges_AllWaggonsAreWrittenIntoFile() { WaggonRepository repository = new WaggonRepository("WaggonConfiguration.xml"); Waggon waggon = CreateFakeWaggon("1234"); repository.Add(waggon); repository.FilePath = "EmptyConfiguration.xml"; repository.SaveChanges(); WaggonRepository repository2 = new WaggonRepository("EmptyConfiguration.xml"); var actual = repository2.GetAll().Count; Assert.AreEqual(409, actual); }