public IActionResult Excercise6(string value)
        {
            var stringTransformer = new StringTransformer();

            try
            {
                ViewBag.Result = stringTransformer.Reverse(value);
            }
            catch (Exception e)
            {
                ViewBag.Error = e.Message;
            }

            return(View());
        }
Beispiel #2
0
        public void TestStringTransformerReverse(string value, string result)
        {
            var stringTransformer = new StringTransformer();

            Assert.Equal(result, stringTransformer.Reverse(value));
        }