예제 #1
0
		/// <exception cref="System.Exception"></exception>
		protected override void Store()
		{
			SimpleMapTestCase.Item item = new SimpleMapTestCase.Item();
			item.map = new Hashtable();
			item.map["zero"] = "zero";
			item.map[new SimpleMapTestCase.ReferenceTypeElement("one")] = "one";
			Store(item);
		}
 public virtual void TestDeletion()
 {
     AssertObjectCount(typeof(SimpleMapTestCase.ReferenceTypeElement), 1);
     SimpleMapTestCase.Item item = (SimpleMapTestCase.Item)RetrieveOnlyInstance(typeof(
                                                                                    SimpleMapTestCase.Item));
     Db().Delete(item);
     AssertObjectCount(typeof(SimpleMapTestCase.ReferenceTypeElement), 0);
 }
 /// <exception cref="System.Exception"></exception>
 protected override void Store()
 {
     SimpleMapTestCase.Item item = new SimpleMapTestCase.Item();
     item.map         = new Hashtable();
     item.map["zero"] = "zero";
     item.map[new SimpleMapTestCase.ReferenceTypeElement("one")] = "one";
     Store(item);
 }
        public virtual void TestQuery()
        {
            IQuery q = Db().Query();

            q.Constrain(typeof(SimpleMapTestCase.Item));
            q.Descend("map").Constrain("zero");
            IObjectSet objectSet = q.Execute();

            Assert.AreEqual(1, objectSet.Count);
            SimpleMapTestCase.Item item = (SimpleMapTestCase.Item)objectSet.Next();
            Assert.AreEqual("zero", item.map["zero"]);
        }
 public virtual void TestRetrieveInstance()
 {
     SimpleMapTestCase.Item item = (SimpleMapTestCase.Item)RetrieveOnlyInstance(typeof(
                                                                                    SimpleMapTestCase.Item));
     Assert.AreEqual("zero", item.map["zero"]);
 }