Esempio n. 1
0
        public void TestReverseWithNull()
        {
            var myStringObject = new MyStringClass();
            var reversedString = myStringObject.Reverse(null);

            Assert.That(reversedString, Is.Null);
        }
Esempio n. 2
0
        public void TestReverse()
        {
            var myStringObject = new MyStringClass();
            var reversedString = myStringObject.Reverse("hello");

            Assert.That(reversedString, Is.EqualTo("olleh"));
        }
Esempio n. 3
0
        public void WhenICallReverseTheLogAspectIsApplies()
        {
            var logger = new MyLogger();
            ObjectFactory.Initialize(x => x.For<ILogger>().Use(logger));

            var obj = new MyStringClass();
            var reverseHello = obj.Reverse("hello");

            Assert.That(reverseHello, Is.EqualTo("olleh"));
            Assert.That(logger.Messages.Count(), Is.EqualTo(0));
        }
Esempio n. 4
0
        public void WhenICallReverseTheLogAspectIsApplies()
        {
            var logger = new MyLogger();

            ObjectFactory.Initialize(x => x.For <ILogger>().Use(logger));

            var obj          = new MyStringClass();
            var reverseHello = obj.Reverse("hello");

            Assert.That(reverseHello, Is.EqualTo("olleh"));
            Assert.That(logger.Messages.Count(), Is.EqualTo(0));
        }
Esempio n. 5
0
 public void TestReverseWithNull()
 {
     var myStringObject = new MyStringClass();
     var reversedString = myStringObject.Reverse(null);
     Assert.That(reversedString, Is.Null);
 }
Esempio n. 6
0
 public void TestReverse()
 {
     var myStringObject = new MyStringClass();
     var reversedString = myStringObject.Reverse("hello");
     Assert.That(reversedString, Is.EqualTo("olleh"));
 }