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

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

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