public async Task GetPolicy_TC01()
        {
            // Arrange
            await PopulateBlobStorage();

            XacmlContextRequest request = new XacmlContextRequest(true, true, GetXacmlContextAttributesWithOrgAndApp());

            // Act
            XacmlPolicy xacmlPolicy = await _prp.GetPolicyAsync(request);

            // Assert
            Assert.NotNull(xacmlPolicy);
        }
Exemple #2
0
        public async Task GetPolicy_TC01()
        {
            // Arrange
            Stream dataStream = File.OpenRead("Data/policy.xml");

            _policyRepositoryMock.Setup(p => p.GetPolicyAsync(It.Is <string>(s => s.Equals("org/app/policy.xml")))).ReturnsAsync(dataStream);
            XacmlContextRequest request = new XacmlContextRequest(true, true, GetXacmlContextAttributesWithOrgAndApp());

            // Act
            var policy = await _prp.GetPolicyAsync(request);

            // Assert
            Assert.NotNull(policy);
        }