예제 #1
0
        public async Task AbpODataEntityController_GetAll_Permission_Test()
        {
            // Arrange
            var client = _factory.CreateClient();

            // Act
            var response = await client.GetAsync("/odata/Products");

            // Assert
            response.StatusCode.ShouldBe(Enum.Parse <HttpStatusCode>("500"));

            _permissionChecker.Received().IsGranted(
                Arg.Is <string>(permissionNames => permissionNames == "GetAllProductsPermission")
                );
        }