public void ReturnsLowerCaseString() { var converter = new TextToLowerCaseConverter(); var actualValue = converter.Convert("LoWeRcAsE", typeof(string), null, (CultureInfo)null); Assert.AreEqual("lowercase", actualValue); }
public void SecondCallRunsFasterThanFirstOne() { var converter = new TextToLowerCaseConverter(); Stopwatch stopwatch1 = new Stopwatch(); stopwatch1.Start(); converter.Convert("UpPeRcAsE", typeof(string), null, (CultureInfo)null); stopwatch1.Stop(); Stopwatch stopwatch2 = new Stopwatch(); stopwatch2.Start(); converter.Convert("UpPeRcAsE", typeof(string), null, (CultureInfo)null); stopwatch2.Stop(); Assert.Less(stopwatch2.Elapsed, stopwatch1.Elapsed); }
public void ReturnsNullForNullValue() { var converter = new TextToLowerCaseConverter(); Assert.AreEqual(null, converter.Convert(null, typeof(string), null, (CultureInfo)null)); }