Ejemplo n.º 1
0
        public void Aspects05Test()
        {
            TestableAdviceAttribute.ResetCalls();

            Sample1.MyFooBar instance = new Sample1.MyFooBar();
            instance.Tag = "helloTag";

            DateTime t = (instance.GetCurrentDateTime(3));

            Assert.AreEqual(new DateTime(2009, 1, 4), t);
            Assert.AreEqual(3, TestableAdviceAttribute.Calls.Count);

            // Check object instance:
            Assert.AreEqual("helloTag", ((Sample1.MyFoo)TestableAdviceAttribute.Calls[1].Instance).Tag);
        }
Ejemplo n.º 2
0
		public void Aspects05Test()
		{
			TestableAdviceAttribute.ResetCalls();

			Sample1.MyFooBar instance = new Sample1.MyFooBar();
			instance.Tag = "helloTag";

			DateTime t = (instance.GetCurrentDateTime(3));

			Assert.AreEqual(new DateTime(2009, 1, 4), t);
			Assert.AreEqual(3, TestableAdviceAttribute.Calls.Count);

			// Check object instance:
			Assert.AreEqual("helloTag", ((Sample1.MyFoo)TestableAdviceAttribute.Calls[1].Instance).Tag);
		}