コード例 #1
0
        internal static ICustomer GetRandom()
        {
            BusinessCustomer result = new()
            {
                CompanyName        = ComplexDataStructureUtilities.GetRandomName(),
                Website            = ComplexDataStructureUtilities.GetRandomWebsite(),
                ContactPhoneNumber = ComplexDataStructureUtilities.GetRandomPhoneNumber(),
                MainResidence      = Address.GetRandom()
            };

            return(result);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #4
0
ファイル: OrderItem.cs プロジェクト: anionDev/GRYLibrary
        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);
        }