Quantcast
Channel: Fluent Assertions
Viewing all articles
Browse latest Browse all 1402

New Post: Support for C# Dynamics

$
0
0

It seems that there is no support for c# dynamics. Can this be confirmed?

When I run the test below, I get the error "
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'string' does not contain a definition for 'Should'".

ViewBag is the dynamic field.

        [TestMethod]
        public void Index()
        {
            var controller = new HomeController();

            var result = controller.Index() as ViewResult;

            result.ViewBag.Message.Should().Be("Welcome to ASP.NET MVC!");
        }

 

 


Viewing all articles
Browse latest Browse all 1402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>