public void Musteri_CanBe_Modified() { using (DBAmbarEntityModel context = new DBAmbarEntityModel()) { Musteri_Table musteri = DomainMocksFactory.CreateMusteri(); context.Musteriler.Add(musteri); context.SaveChanges(); } using (DBAmbarEntityModel context = new DBAmbarEntityModel()) { var result = context.Musteriler.Where(x => x.Musteri_Name == DomainMocksFactory.MUSTERI_NAME); Musteri_Table musteri = result.FirstOrDefault(); musteri.Musteri_Name = "Modified"; context.SaveChanges(); } using (DBAmbarEntityModel context = new DBAmbarEntityModel()) { var result = context.Musteriler.Where(x => x.Musteri_Name == "Modified"); Musteri_Table musteri = result.FirstOrDefault(); Assert.IsTrue(musteri.Musteri_Name == "Modified"); } }
public static Musteri_Table CreateMusteri() { Musteri_Table musteri = new Musteri_Table(); musteri.Musteri_Name = MUSTERI_NAME; musteri.User_name = USERNAME; musteri.Change_Date = CHANGE_DATE; musteri.Gorev = GOREV; musteri.Modified_Person = MODIFIED_PERSON; return(musteri); }
public void TestInitialize() { mockMusteri = DomainMocksFactory.CreateMusteri(); }