コード例 #1
0
        public virtual void TestCriteriaQueryQueryWithValueInList6()
        {
            string baseName = GetBaseName();

            SetUp(baseName);
            NeoDatis.Odb.ODB odb     = Open(baseName);
            IList <string>   strings = new List
                                       <string>();
            ClassWithListOfString c = new ClassWithListOfString
                                          ("name", strings);

            c.GetStrings().Add("s1");
            c.GetStrings().Add(null);
            c.GetStrings().Add("s3");
            IList <string> strings2 = new List
                                      <string>();
            ClassWithListOfString c2 = new ClassWithListOfString
                                           ("name", null);

            odb.Store(c);
            odb.Store(c2);
            odb.Close();
            odb = Open(baseName);
            CriteriaQuery query = new CriteriaQuery
                                      (typeof(ClassWithListOfString), Where
                                      .Contain("strings", "s4"));

            NeoDatis.Odb.Objects <ClassWithListOfString> l =
                odb.GetObjects <ClassWithListOfString>(query);
            odb.Close();
            AssertEquals(0, l.Count);
        }
コード例 #2
0
ファイル: TestCriteriaQuery3.cs プロジェクト: ekicyou/pasta
        /// <exception cref="System.Exception"></exception>
        public virtual void TestCriteriaQueryQueryWithValueInList4()
        {
            string baseName = GetBaseName();

            NeoDatis.Odb.ODB odb = Open(baseName);
            System.Collections.Generic.IList <string> strings = new System.Collections.Generic.List
                                                                <string>();
            ClassWithListOfString c = new ClassWithListOfString
                                          ("name", strings);

            c.GetStrings().Add("s1");
            c.GetStrings().Add("s2");
            c.GetStrings().Add("s3");
            System.Collections.Generic.IList <string> strings2 = new System.Collections.Generic.List
                                                                 <string>();
            ClassWithListOfString c2 = new ClassWithListOfString
                                           ("name", strings2);

            c2.GetStrings().Add("s1");
            c2.GetStrings().Add("s2");
            c2.GetStrings().Add("s3");
            odb.Store(c);
            odb.Store(c2);
            odb.Close();
            odb = Open(baseName);
            CriteriaQuery query = new CriteriaQuery(Where.Contain("strings", "s2222"));

            NeoDatis.Odb.Objects <ClassWithListOfString> l = odb.GetObjects <ClassWithListOfString>(query);
            AssertEquals(0, l.Count);
            odb.Close();
        }
コード例 #3
0
ファイル: TestCriteriaQuery3.cs プロジェクト: ekicyou/pasta
        public virtual void TestCriteriaQueryQueryWithValueInList6()
		{
			string baseName = GetBaseName();
            SetUp(baseName);
			NeoDatis.Odb.ODB odb = Open(baseName);
			IList<string> strings = new List
				<string>();
			ClassWithListOfString c = new ClassWithListOfString
				("name", strings);
			c.GetStrings().Add("s1");
			c.GetStrings().Add(null);
			c.GetStrings().Add("s3");
			IList<string> strings2 = new List
				<string>();
			ClassWithListOfString c2 = new ClassWithListOfString
				("name", null);
			odb.Store(c);
			odb.Store(c2);
			odb.Close();
			odb = Open(baseName);
			CriteriaQuery query = new CriteriaQuery
				(typeof(ClassWithListOfString), Where
				.Contain("strings", "s4"));
			NeoDatis.Odb.Objects<ClassWithListOfString> l =
                odb.GetObjects <ClassWithListOfString>(query);
			odb.Close();
			AssertEquals(0, l.Count);
		}
コード例 #4
0
ファイル: TestCriteriaQuery3.cs プロジェクト: ekicyou/pasta
		/// <exception cref="System.Exception"></exception>
		public virtual void TestCriteriaQueryQueryWithValueInList4()
		{
			string baseName = GetBaseName();
			NeoDatis.Odb.ODB odb = Open(baseName);
			System.Collections.Generic.IList<string> strings = new System.Collections.Generic.List
				<string>();
			ClassWithListOfString c = new ClassWithListOfString
				("name", strings);
			c.GetStrings().Add("s1");
			c.GetStrings().Add("s2");
			c.GetStrings().Add("s3");
			System.Collections.Generic.IList<string> strings2 = new System.Collections.Generic.List
				<string>();
			ClassWithListOfString c2 = new ClassWithListOfString
				("name", strings2);
			c2.GetStrings().Add("s1");
			c2.GetStrings().Add("s2");
			c2.GetStrings().Add("s3");
			odb.Store(c);
			odb.Store(c2);
			odb.Close();
			odb = Open(baseName);
			CriteriaQuery query = new CriteriaQuery	(Where.Contain("strings", "s2222"));
            NeoDatis.Odb.Objects<ClassWithListOfString> l = odb.GetObjects < ClassWithListOfString>(query);
			AssertEquals(0, l.Count);
			odb.Close();
		}