Refactoring and Adding Tests (#58)
* Moving Identity seeding to its own class and method. * Adding tests for AddItem * Added catalog api controller and functional tests Added and cleaned up some comments * Adding integration tests for OrderRepository * Getting integration test for order working with inmemory db
This commit is contained in:
28
tests/UnitTests/Builders/AddressBuilder.cs
Normal file
28
tests/UnitTests/Builders/AddressBuilder.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using ApplicationCore.Entities.OrderAggregate;
|
||||
|
||||
namespace UnitTests.Builders
|
||||
{
|
||||
public class AddressBuilder
|
||||
{
|
||||
private Address _address;
|
||||
public string TestStreet => "123 Main St.";
|
||||
public string TestCity => "Kent";
|
||||
public string TestState => "OH";
|
||||
public string TestCountry => "USA";
|
||||
public string TestZipCode => "44240";
|
||||
|
||||
public AddressBuilder()
|
||||
{
|
||||
_address = WithDefaultValues();
|
||||
}
|
||||
public Address Build()
|
||||
{
|
||||
return _address;
|
||||
}
|
||||
public Address WithDefaultValues()
|
||||
{
|
||||
_address = new Address(TestStreet, TestCity, TestState, TestCountry, TestZipCode);
|
||||
return _address;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user