コード例 #1
0
 public CustomerBuilder WithTestValues()
 {
     _id = 100;
     _internalCustomer = new Customer(100)
     {
         HomeAddress    = _addressBuilder.WithTestValues().Build(),
         FirstName      = "Bob",
         LastName       = "Smith",
         CreditRating   = 650,
         OrderHistory   = new List <Order>(),
         TotalPurchases = 13.37m
     };
     return(this);
 }
コード例 #2
0
        public CustomerBuilder WithTestValues()
        {
            _id             = VALID_CUSTOMER_ID;
            _firstName      = VALID_FIRST_NAME;
            _lastName       = VALID_LAST_NAME;
            _creditRating   = VALID_CREDIT_RATING;
            _totalPurchases = VALID_TOTAL_PURCHASES;

            var addressBuilder = new  AddressBuilder();

            _homeAddress = addressBuilder.WithTestValues().Build();

            return(this);
        }
コード例 #3
0
        public CustomerBuilder WithTestValues()
        {
            _id             = TEST_ID;
            _firstName      = "FirstTest";
            _lastName       = "LastTest";
            _creditRating   = 250;
            _totalPurchases = 25;

            AddressBuilder addressBuilder = new AddressBuilder();

            _address = addressBuilder
                       .WithTestValues()
                       .Build();

            return(this);
        }