public void Should_Update_Layer_In_Db(int id) { var fakeContext = new FakeContext("UpdateLayer"); fakeContext.FillWith <Layer>(); using (var context = new MainContext(fakeContext.FakeOptions)) { var repository = new LayerRepository(context); var currentLayer = repository.GetById(id); currentLayer.Name = "123abc"; repository.Update(currentLayer); Assert.Equal("123abc", repository.GetById(id).Name); repository.Dispose(); } }