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

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

            Assert.That(reversedString, Is.EqualTo("olleh"));
        }
Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #5
0
 public void TestReverseWithNull()
 {
     var myStringObject = new MyStringClass();
     var reversedString = myStringObject.Reverse(null);
     Assert.That(reversedString, Is.Null);
 }
Beispiel #6
0
 public void TestReverse()
 {
     var myStringObject = new MyStringClass();
     var reversedString = myStringObject.Reverse("hello");
     Assert.That(reversedString, Is.EqualTo("olleh"));
 }