예제 #1
0
        public void TestThatMyNameIsChris()
        {
            var theName     = "Chris";
            var sharedclass = new SharedClass();

            var result = sharedclass.SayMyName(theName);

            Assert.AreEqual(string.Format("Your name is {0}", theName), result);
        }
        public ActionResult Index(string theName)
        {
            if (!string.IsNullOrEmpty(theName))
            {
                var sharedclass = new SharedClass();
                var result      = sharedclass.SayMyName(theName);
                var model       = new FormVm
                {
                    Result = result
                };

                return(View(model));
            }

            return(View());
        }