public void IsAllowed_NoOperationsPermitted_OperationIsNotAllowed() { // Arrange var operationToCheck = Tuple.Create(AREA_1_ID, OPERATION_3_ID); var allowedOperations = new AllowedOperations(new List <AuthOperation>()); // Act bool result = allowedOperations.IsAllowed(operationToCheck); // Assert Assert.IsFalse(result); }
public void IsAllowed_OperationPermitted_OperationIsAllowed() { // Arrange var operationToCheck = Tuple.Create(AREA_1_ID, OPERATION_1_ID); var allowedOperations = new AllowedOperations(new List <AuthOperation> { Tuple.Create(AREA_1_ID, OPERATION_1_ID), Tuple.Create(AREA_1_ID, OPERATION_2_ID) }); // Act bool result = allowedOperations.IsAllowed(operationToCheck); // Assert Assert.IsTrue(result); }