public void Save() { var testClass = new WeirdClass(); var id = testClass.Id(); testClass.Save(); Assert.False(testClass.IsNew()); Assert.False(testClass.IsModified()); Assert.Equal(id, testClass.Id()); var loadedTestClass = Modl<WeirdClass>.Get(id); Assert.Equal(id, loadedTestClass.Id()); Assert.False(loadedTestClass.IsNew()); Assert.False(loadedTestClass.IsModified()); }
public void Save() { var testClass = new WeirdClass(); var id = testClass.Id(); testClass.Save(); Assert.False(testClass.IsNew()); Assert.False(testClass.IsModified()); Assert.Equal(id, testClass.Id()); var loadedTestClass = Modl <WeirdClass> .Get(id); Assert.Equal(id, loadedTestClass.Id()); Assert.False(loadedTestClass.IsNew()); Assert.False(loadedTestClass.IsModified()); }