Ejemplo n.º 1
0
            public void ReturnsLowerCaseString()
            {
                var converter   = new TextToLowerCaseConverter();
                var actualValue = converter.Convert("LoWeRcAsE", typeof(string), null, (CultureInfo)null);

                Assert.AreEqual("lowercase", actualValue);
            }
Ejemplo n.º 2
0
            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);
            }
Ejemplo n.º 3
0
            public void ReturnsNullForNullValue()
            {
                var converter = new TextToLowerCaseConverter();

                Assert.AreEqual(null, converter.Convert(null, typeof(string), null, (CultureInfo)null));
            }