public void OperationStep_FalseForAnonymous() { var item = new NavigationItem("", "", "", "", false, "", ""); item.IsVisible.Should().Be(false); item.IsVisibleToUser(null).Should().BeFalse(); }
public void OperationStep_TrueForAdmin() { var item = new NavigationItem("", "", "", "", false, "", "", "admin, test"); item.IsVisible.Should().Be(false); var principal = GetAdminClaimsPrincipal(); item.IsVisibleToUser(principal).Should().BeTrue(); }