Beispiel #1
0
        /// <exception cref="System.Exception"></exception>
        public virtual void Test8Ordering()
        {
            if (!isLocal)
            {
                return;
            }
            NeoDatis.Odb.ODB odb = Open("get.neodatis");
            NeoDatis.Odb.Core.Query.NQ.SimpleNativeQuery query = new _SimpleNativeQuery_208();
            query.OrderByAsc("name,email");
            NeoDatis.Odb.Objects l = odb.GetObjects(query, true);
            int i = 0;

            while (l.HasNext())
            {
                NeoDatis.Odb.Test.VO.Login.User user = (NeoDatis.Odb.Test.VO.Login.User)l.Next();
                // println(user.getName() + " / " + user.getEmail());
                AssertEquals("olivier " + i / 3, user.GetName());
                AssertEquals("[email protected] " + ((i % 3) + 1), user.GetEmail());
                i++;
            }
            odb.Close();
        }
Beispiel #2
0
		/// <exception cref="System.Exception"></exception>
		public virtual void Test8Ordering()
		{
			if (!isLocal)
			{
				return;
			}
			NeoDatis.Odb.ODB odb = Open("get.neodatis");
			NeoDatis.Odb.Core.Query.NQ.SimpleNativeQuery query = new _SimpleNativeQuery_208();
			query.OrderByAsc("name,email");
			NeoDatis.Odb.Objects l = odb.GetObjects(query, true);
			int i = 0;
			while (l.HasNext())
			{
				NeoDatis.Odb.Test.VO.Login.User user = (NeoDatis.Odb.Test.VO.Login.User)l.Next();
				// println(user.getName() + " / " + user.getEmail());
				AssertEquals("olivier " + i / 3, user.GetName());
				AssertEquals("[email protected] " + ((i % 3) + 1), user.GetEmail());
				i++;
			}
			odb.Close();
		}