Exemple #1
0
        public virtual void Test_Can_Save_Object()
        {
            TestItemAdditionalInit newItem = new TestItemAdditionalInit();

            newItem.Something = "a";
            dstore.SaveObject(newItem);

            Assert.IsTrue(newItem.id > 0);
            Assert.IsNotNull(dstore.LoadObject <TestItemAdditionalInit>(1));
        }
Exemple #2
0
        public virtual void Test_Additional_Init_Is_Called()
        {
            TestItemAdditionalInit newItem = new TestItemAdditionalInit();

            newItem.Something = "a";
            dstore.InsertObject(newItem);

            Assert.IsTrue(dstore.LoadObject(newItem));
            Assert.IsTrue(!string.IsNullOrEmpty(newItem.Something));
            Assert.IsTrue(newItem.Something.Equals("a", StringComparison.InvariantCultureIgnoreCase));
            Assert.IsTrue(newItem.Calculated == 15);
        }