public virtual void TestWriteReadTypeOidAndVersion() { ObjectData data = CreateData(typeof(Role), 99, new FileVersion("user", 19)); manager.InsertObject(data); ObjectData read = manager.LoadObjectData(data.Oid); Assert.AreEqual(data.Oid, read.Oid); Assert.AreEqual(data.ClassName, read.ClassName); Assert.AreEqual(data.Version, read.Version); }
public override void SetUp() { base.SetUp(); manager = new XmlDataManager(); XmlFile.DirectoryName = XmlDataManagerTest.testDir; ClearTestDirectory(); FileVersion.Clock = new TestClock(); oids = new SerialOid[SIZE]; data = new ObjectData[SIZE]; INakedObjectSpecification type = system.GetSpecification(typeof(object)); pattern = new ObjectData(type, null, new FileVersion("user", 13)); for (int i = 0; i < SIZE; i++) { oids[i] = SerialOid.CreatePersistent(i, typeof(object).FullName); data[i] = new ObjectData(type, oids[i], new FileVersion("user", 13)); manager.InsertObject(data[i]); } }
public override void SetUp() { base.SetUp(); manager = new XmlDataManager(); XmlFile.DirectoryName = XmlDataManagerTest.testDir; ClearTestDirectory(); FileVersion.Clock = new TestClock(); oids = new SerialOid[SIZE]; data = new ObjectData[SIZE]; INakedObjectSpecification type = system.GetSpecification(typeof(object)); pattern = new ObjectData(type, null, new FileVersion("user", 13)); for (int i = 0; i < SIZE; i++) { oids[i] = SerialOid.CreatePersistent(i, typeof(object).FullName); data[i] = new ObjectData(type, oids[i], new FileVersion("user", 13)); manager.InsertObject(data[i]); } }