Пример #1
0
 private void AssertNext(object[] expected, IQueue4 queue)
 {
     for (var i = 0; i < expected.Length; i++)
     {
         var @object = expected[i];
         Assert.IsTrue(queue.HasNext(), "Expecting '" + @object + "'");
         Assert.AreSame(@object, queue.Next());
     }
     Assert.IsFalse(queue.HasNext());
 }
Пример #2
0
 private void InitializeAspects()
 {
     while (_members.HasNext())
     {
         ClassMetadata classMetadata = ((ClassMetadata)_members.Next());
         classMetadata.InitializeAspects();
         _statics.Add(classMetadata);
     }
 }
Пример #3
0
 public virtual void Test()
 {
     _queue.Add("A");
     _queue.Add("B");
     _queue.Add("B");
     _queue.Add("A");
     Assert.AreEqual("A", _queue.Next());
     Assert.AreEqual("B", _queue.Next());
     Assert.IsFalse(_queue.HasNext());
 }
Пример #4
0
 private void CheckInits()
 {
     CheckWrites();
     while (_inits.HasNext())
     {
         ClassMetadata classMetadata = ((ClassMetadata)_inits.Next());
         classMetadata.InitConfigOnUp(_systemTransaction);
         CheckWrites();
     }
 }
Пример #5
0
 private void CheckStatics()
 {
     InitializeAspects();
     while (_statics.HasNext())
     {
         ClassMetadata classMetadata = ((ClassMetadata)_statics.Next());
         classMetadata.StoreStaticFieldValues(_systemTransaction, true);
         _writes.Add(classMetadata);
         InitializeAspects();
     }
 }
Пример #6
0
 private void CheckWrites()
 {
     CheckStatics();
     while (_writes.HasNext())
     {
         ClassMetadata classMetadata = ((ClassMetadata)_writes.Next());
         classMetadata.SetStateDirty();
         classMetadata.Write(_systemTransaction);
         _inits.Add(classMetadata);
         CheckStatics();
     }
 }
Пример #7
0
 public virtual bool HasNext()
 {
     return(_queue.HasNext());
 }
		private void AssertNext(object[] expected, IQueue4 queue)
		{
			for (int i = 0; i < expected.Length; i++)
			{
				object @object = expected[i];
				Assert.IsTrue(queue.HasNext(), "Expecting '" + @object + "'");
				Assert.AreSame(@object, queue.Next());
			}
			Assert.IsFalse(queue.HasNext());
		}