-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestInit.cs
67 lines (61 loc) · 1.87 KB
/
TestInit.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
namespace strategy.pattern
{
public static class TestInit
{
public static Order CreateOrder_FedEx()
{
return new Order()
{
ShippingMethod = Order.ShippingOptions.FedEx,
Destination = TestInit.CreateAddress_Destination(),
Origin = TestInit.CreateAddress_Origin()
};
}
public static Order CreateOrder_USPS()
{
return new Order()
{
ShippingMethod = Order.ShippingOptions.USPS,
Destination = TestInit.CreateAddress_Destination(),
Origin = TestInit.CreateAddress_Origin()
};
}
public static Order CreateOrder_UPS()
{
return new Order()
{
ShippingMethod = Order.ShippingOptions.UPS,
Destination = TestInit.CreateAddress_Destination(),
Origin = TestInit.CreateAddress_Origin()
};
}
public static Address CreateAddress_Origin()
{
return new Address()
{
ContactName = "David Starr",
AddressLine1 = "185 Lincoln St.",
AddressLine2 = "Suite 305",
AddressLine3 = null,
City = "Hingham",
Country = "U.S.",
Region = "MA",
PostalCode = "02043-1741"
};
}
public static Address CreateAddress_Destination()
{
return new Address()
{
ContactName = "Homer Simpson",
AddressLine1 = "123 Elm",
AddressLine2 = null,
AddressLine3 = null,
City = "Springfield",
Country = "U.S.",
Region = "Iowa",
PostalCode = "11111"
};
}
}
}