public async Task GetFunctionalRolesForIpo_AsViewer_ShouldGetFunctionalRolesForIpo()
        {
            // Act
            var functionalRoles = await ParticipantsControllerTestsHelper.GetFunctionalRolesForIpoAsync(
                UserType.Viewer,
                TestFactory.PlantWithAccess);

            // Assert
            var functionalRole1 = functionalRoles.First();
            var functionalRole2 = functionalRoles.Last();

            Assert.AreEqual(2, functionalRoles.Count);
            Assert.AreEqual(FunctionalRoleCode1, functionalRole1.Code);
            Assert.AreEqual(FunctionalRoleCode2, functionalRole2.Code);
        }
Beispiel #2
0
 public async Task GetFunctionalRolesForIpo_AsHacker_ShouldReturnBadRequest_WhenUnknownPlant()
 => await ParticipantsControllerTestsHelper.GetFunctionalRolesForIpoAsync(
     UserType.Hacker,
     TestFactory.UnknownPlant,
     HttpStatusCode.BadRequest,
     "is not a valid plant");
Beispiel #3
0
 public async Task GetFunctionalRolesForIpo_AsHacker_ShouldReturnForbidden_WhenPermissionMissing()
 => await ParticipantsControllerTestsHelper.GetFunctionalRolesForIpoAsync(
     UserType.Hacker,
     TestFactory.PlantWithAccess,
     HttpStatusCode.Forbidden);
Beispiel #4
0
 public async Task GetFunctionalRolesForIpo_AsAnonymous_ShouldReturnUnauthorized()
 => await ParticipantsControllerTestsHelper.GetFunctionalRolesForIpoAsync(
     UserType.Anonymous,
     TestFactory.UnknownPlant,
     HttpStatusCode.Unauthorized);