GetBlog() private method

private GetBlog ( long id, string slug = null ) : IActionResult
id long
slug string
return IActionResult
Beispiel #1
0
    public void Get_blog_1_returns_google()
    {
        // Act
        var result = _controller.GetBlog(1) as ViewResult;

        // Assert
        Assert.IsType(typeof(Blog), result.ViewData.Model);
        Blog model = (Blog)result.ViewData.Model;

        Assert.Equal("google", model.Url);
    }