Ejemplo n.º 1
0
        public static IEnumerable <object[]> RoleFormTestList_InvalidForm()
        {
            string validCode = ValUtil.GetCode();
            string validName = ValUtil.GetDisplayName();

            Permission[] validPermissions = new Permission[] { PermissionData.Resource_09_R_R };

            yield return(new object[] { ValUtil.GetCode("!<[&%>"), validName, null, validPermissions });

            yield return(new object[] { ValUtil.GetCode(Constants.Validation.Code_Length_Max + 1), validName, null, validPermissions });

            yield return(new object[] { validCode, ValUtil.GetDisplayName("<[(&}%"), null, validPermissions });

            yield return(new object[] { validCode, validName, ValUtil.GetDescription("!%&$/(#$\\-[¨*´<"), validPermissions });

            yield return(new object[] { validCode, validName, ValUtil.GetDescription(Constants.Validation.Description_Length_Max + 1), validPermissions });

            yield return(new object[] { validCode, validName, null, new Permission[] {} });

            yield return(new object[] { validCode, validName, null, null });

            yield return(new object[] { validCode, ValUtil.GetDisplayName(Constants.Validation.DisplayName_Length_Max + 1), null, validPermissions });
        }
Ejemplo n.º 2
0
Archivo: Edit.cs Proyecto: Agnael/Sero
        public static IEnumerable <object[]> Success_Data()
        {
            Permission[] validPermissions = new Permission[] { PermissionData.Resource_09_R_R };
            yield return(new object[] { RoleData.Role_01_Admin.Code, ValUtil.GetDisplayName(), ValUtil.GetDescription(), validPermissions });

            yield return(new object[] { RoleData.Role_01_Admin.Code, ValUtil.GetDisplayName(), ValUtil.GetDescription(), validPermissions });

            yield return(new object[] { RoleData.Role_01_Admin.Code, ValUtil.GetDisplayName(), ValUtil.GetDescription(), validPermissions });

            yield return(new object[] { RoleData.Role_02_User.Code, ValUtil.GetDisplayName(), ValUtil.GetDescription(), validPermissions });

            yield return(new object[] { RoleData.Role_02_User.Code, ValUtil.GetDisplayName(), ValUtil.GetDescription(), validPermissions });

            yield return(new object[] { RoleData.Role_02_User.Code, ValUtil.GetDisplayName(), ValUtil.GetDescription(), validPermissions });
        }