Exemple #1
0
 protected override object[] CreateValues()
 {
     object[] cars = new object[ObjectCount];
     for (int i = 0; i < cars.Length; i++)
     {
         QueryingMigrationTestCase.Car car = new QueryingMigrationTestCase.Car();
         car._name = "Car " + i;
         QueryingMigrationTestCase.Pilot pilot = new QueryingMigrationTestCase.Pilot();
         car._pilot  = pilot;
         pilot._name = "Pilot " + i;
         cars[i]     = car;
     }
     return(cars);
 }
		protected override object[] CreateValues()
		{
			object[] cars = new object[ObjectCount];
			for (int i = 0; i < cars.Length; i++)
			{
				QueryingMigrationTestCase.Car car = new QueryingMigrationTestCase.Car();
				car._name = "Car " + i;
				QueryingMigrationTestCase.Pilot pilot = new QueryingMigrationTestCase.Pilot();
				car._pilot = pilot;
				pilot._name = "Pilot " + i;
				cars[i] = car;
			}
			return cars;
		}
Exemple #3
0
 // do nothing
 protected override void AssertQueries(IExtObjectContainer objectContainer)
 {
     for (int i = 0; i < ObjectCount; i++)
     {
         IQuery query = objectContainer.Query();
         query.Constrain(typeof(QueryingMigrationTestCase.Car));
         query.Descend("_pilot").Descend("_name").Constrain("Pilot " + i);
         IObjectSet objectSet = query.Execute();
         Assert.AreEqual(1, objectSet.Count);
         QueryingMigrationTestCase.Car car = (QueryingMigrationTestCase.Car)objectSet.Next
                                                 ();
         Assert.AreEqual("Car " + i, car._name);
         Assert.AreEqual("Pilot " + i, car._pilot._name);
     }
 }