public static SysUser BuildASysUser() { var id = Guid.NewGuid(); var name = id + "_name"; var surname = id + "_surname"; var emailAddress = id + "@test.com"; var userName = id + "_userName"; var idNumber = IdNumberBuilder.BuildAnIdNumber(); return(new SysUserBuilder( id, name, surname, userName, emailAddress, idNumber ).Build()); }
public static IList <SysUser> BuildSysUsers(int numberOfUsers) { IList <SysUser> sysUsers = new List <SysUser>(); while (numberOfUsers > 0) { var idNumber = IdNumberBuilder.BuildAnIdNumber(); while (sysUsers.Count > 0 && sysUsers.FirstOrDefault(s => s.IdNumber == idNumber) != null) { idNumber = IdNumberBuilder.BuildAnIdNumber(); } var usr = BuildASysUser(idNumber); sysUsers.Add(usr); numberOfUsers--; } return(sysUsers); }
public IdentityBuilder() { _identityNumber = IdNumberBuilder.BuildAnIdNumber(); }