Exemplo n.º 1
0
    public void EvalSubPropertyNamedValueInModel()
    {
        // Arrange
        var model = new TheQueryStringParam
        {
            Name  = "The Name",
            Value = "The Value",
            Model = "The Model",
        };
        var viewData = GetViewDataDictionary(model);

        viewData["Title"]   = "Home Page";
        viewData["Message"] = "Welcome to ASP.NET MVC!";

        // Act
        var result = viewData.Eval("Value");

        // Assert
        Assert.Equal("The Value", result);
    }
Exemplo n.º 2
0
        public void EvalSubPropertyNamedValueInModel()
        {
            // Arrange
            var model = new TheQueryStringParam
            {
                Name = "The Name",
                Value = "The Value",
                Model = "The Model",
            };
            var viewData = GetViewDataDictionary(model);
            viewData["Title"] = "Home Page";
            viewData["Message"] = "Welcome to ASP.NET MVC!";

            // Act
            var result = viewData.Eval("Value");

            // Assert
            Assert.Equal("The Value", result);
        }