Catbert4.Tests.Core.Helpers.CreateValidEntities.User C# (CSharp) Method

User() public static method

public static User ( int counter, bool populateAllFields = false ) : User
counter int
populateAllFields bool
return User
        public static User User(int? counter, bool populateAllFields = false)
        {
            var rtValue = new User();
            rtValue.LoginId = "LoginId" + counter.Extra();
            var localCounter = 99;
            if (counter != null)
                localCounter = (int)counter;
            //rtValue.UserKey = SpecificGuid.GetGuid(localCounter);
            rtValue.Inactive = false;
            if (populateAllFields)
            {
                rtValue.Email = string.Format("test{0}@testy.com", counter.Extra());
                //rtValue.EmployeeId = "x".RepeatTimes(9);
                rtValue.FirstName = "FirstName" + counter.Extra();
                rtValue.LastName = "LastName" + counter.Extra();
                rtValue.Phone = "+1 530 763 0395";
                //rtValue.StudentId = "x".RepeatTimes(9);
            }

            return rtValue;
        }