Esempio n. 1
0
        internal static ICustomer GetRandom()
        {
            BusinessCustomer result = new()
            {
                CompanyName        = ComplexDataStructureUtilities.GetRandomName(),
                Website            = ComplexDataStructureUtilities.GetRandomWebsite(),
                ContactPhoneNumber = ComplexDataStructureUtilities.GetRandomPhoneNumber(),
                MainResidence      = Address.GetRandom()
            };

            return(result);
        }
Esempio n. 2
0
        internal static ICustomer GetRandom()
        {
            PrivateCustomer result = new()
            {
                Forename           = ComplexDataStructureUtilities.GetRandomName(),
                Surname            = ComplexDataStructureUtilities.GetRandomName(),
                ContactPhoneNumber = ComplexDataStructureUtilities.GetRandomPhoneNumber(),
                MainResidence      = Address.GetRandom(),
                DateOfBirth        = ComplexDataStructureUtilities.GetRandomDateOfBirth()
            };

            return(result);
        }
Esempio n. 3
0
        public static Employee GetRandom(OrganizationUnit organizationUnit = null)
        {
            Employee result = new()
            {
                OrganizationUnit = organizationUnit,
                Forename         = ComplexDataStructureUtilities.GetRandomName(),
                Surname          = ComplexDataStructureUtilities.GetRandomName(),
                DateOfBirth      = ComplexDataStructureUtilities.GetRandomDateOfBirth(),
                MainResidence    = Address.GetRandom()
            };

            return(result);
        }
Esempio n. 4
0
        internal static OrderItem GetRandom(Product product)
        {
            OrderItem result = new()
            {
                Product           = product,
                Price             = MoneyAmount.GetRandom(),
                NotesFromCustomer = ComplexDataStructureUtilities.GetRandomNotes()
            };

            if (new Random().NextDouble() < 0)
            {
                result.UsedVoucherCode = ComplexDataStructureUtilities.GetRandomName();
            }
            else
            {
                result.UsedVoucherCode = null;
            }
            return(result);
        }