public virtual void TestSaveObjectCreatesNewVersion()
        {
            nakedObject.OptimisticLock = new NullVersion();

            IPersistenceCommand[] commands = new IPersistenceCommand[1];
            commands[0] = objectStore.CreateCreateObjectCommand(nakedObject);
            objectStore.Execute(commands);

            Assert.AreEqual(new FileVersion(null, 1), nakedObject.Version);
        }
Esempio n. 2
0
        public virtual void TestSaveObject()
        {
            nakedObject.OptimisticLock = new NullVersion();

/*
 *          Person person = new Person();
 *          nakedObject.SetupObject(person);
 */



            IPersistenceCommand[] commands = new IPersistenceCommand[1];
            commands[0] = objectStore.CreateCreateObjectCommand(nakedObject);
            objectStore.Execute(commands);

            IOid oid = nakedObject.Oid;

            objectStore.Reset();

            //       objectStore.GetObject(oid, nakedObject.Specification);

//            IQueryable instances = objectStore.GetInstances(nakedObject.Specification);
        }