Open
Description
This code:
const string pageName = "pageName";
_sut.GetByPageName(pageName)
.Should()
.BeViewResult()
.WithViewData("PageName", pageName)
.WithViewData("Roles", _roles) // this call fails!
.WithViewData("FieldName", null);
causes:
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=FluentAssertions.Mvc5
StackTrace:
at FluentAssertions.Mvc.ViewResultBaseAssertions`1.WithViewData(String key, Object expectedValue, String reason, Object[] reasonArgs)
at Tests.Controllers.HelpEditor.HelpEditorControllerTest.GetByPageName_Should_return_view_for_specified_pageName() in ...\....Tests\Controllers\HelpEditor\HelpEditorControllerTest.cs:line 48
Metadata
Metadata
Assignees
Labels
No labels