You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The second call to WithViewData throws NullReferenceException #40
conststringpageName="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
Activity
kevinkuszyk commentedon Jun 25, 2020
@milichev if you're able to fix, I would gladly take a PR.