public void TestString() { var clazz = new Class_string { Attr = "abc" }; DataService.UpdateObject(clazz); var clazz2 = new Class_string { __PrimaryKey = clazz.__PrimaryKey }; DataService.LoadObject(clazz2); Assert.True(clazz.Attr == clazz2.Attr); clazz2.Attr = "123"; DataService.UpdateObject(clazz2); clazz2 = new Class_string { __PrimaryKey = clazz.__PrimaryKey }; DataService.LoadObject(clazz2); Assert.True(clazz.Attr != clazz2.Attr); clazz2.SetStatus(ObjectStatus.Deleted); DataService.UpdateObject(clazz2); clazz2 = new Class_string { __PrimaryKey = clazz.__PrimaryKey }; try { DataService.LoadObject(clazz2); Assert.True(false, "Object not deleted."); } catch (CantFindDataObjectException) { } }
public void TestForwardSlash() { var clazz = new Class_string { Attr = "abc\\de" }; DataService.UpdateObject(clazz); var clazz2 = new Class_string { __PrimaryKey = clazz.__PrimaryKey }; DataService.LoadObject(clazz2); Assert.True(clazz.Attr == clazz2.Attr); }