Example #1
0
 public File(Common.Shop shop, Common.Type type)
 {
     _shop = shop;
     _type = type;
 }
Example #2
0
        public void ValidParameterUpdateAclActionListTests(Target target, Category category, Common.Type type, string subType, bool allow, bool deny)
        {
            var actionItem = new Dictionary <string, object>()
            {
                [ActionListPermissionParam.CustomActionId.GetEnumStringValue()] = string.Empty,
                [ActionListPermissionParam.SubType.GetEnumStringValue()]        = subType,
                [ActionListPermissionParam.Target.GetEnumStringValue()]         = target.ToString(),
                [ActionListPermissionParam.Category.GetEnumStringValue()]       = category.ToString(),
                [ActionListPermissionParam.Type.GetEnumStringValue()]           = type.ToString(),
                [ActionListPermissionParam.Allow.GetEnumStringValue()]          = allow,
                [ActionListPermissionParam.Deny.GetEnumStringValue()]           = deny,
            };
            var request = new Dictionary <string, object>()
            {
                [ActionListPermissionParam.Id.GetEnumStringValue()]      = Id,
                [ActionListPermissionParam.Actions.GetEnumStringValue()] = new List <object> {
                    actionItem
                },
            };
            var defaultManager = new DefaultManager();
            var response       = defaultManager.Send <object>(ActionEndpoints.ActionListPermissions, request.ToJson(), HttpMethod.PUT);

            PrAssert.That(response, PrIs.SuccessfulResponse().And.HttpCode(System.Net.HttpStatusCode.NoContent));
        }