public void ReverseWithNull_Test() { var myStrObj = new MyStringExtension(); var reversedStr = myStrObj.Reverse(null); Assert.IsNull(reversedStr); }
public void Reverse_Test() { var mockloggingService = new Mock <ILoggingService>(); ObjectFactory.Initialize(x => x.For <ILoggingService>().Use(mockloggingService.Object)); //AspectSettings.On = false; var myStrObj = new MyStringExtension(); var reversedStr = myStrObj.Reverse("hello"); Assert.That(reversedStr, Is.EqualTo("olleh")); }