Esempio n. 1
0
        private static InMemoryDataContext GetTestContext()
        {
            var inMemoryDataContext = new InMemoryDataContext();

            inMemoryDataContext.Add(new ExampleLeaf()
            {
                Id          = 1,
                SecuredRoot = new ExampleRoot()
                {
                    Id   = 1,
                    Name = "Example Root"
                }
            });
            inMemoryDataContext.Add(new ExampleLeaf()
            {
                Id          = 2,
                SecuredRoot = new ExampleRoot()
                {
                    Id   = 2,
                    Name = "Example Root"
                }
            });
            inMemoryDataContext.Add(new ExampleLeaf()
            {
                Id          = 3,
                SecuredRoot = new ExampleRoot()
                {
                    Id   = 4,
                    Name = "A First Record"
                }
            });
            inMemoryDataContext.Commit();
            return(inMemoryDataContext);
        }
        public async Task GetAllSync_WithOneMatchPlayed_ReturnsOneMatch()
        {
            // Arrange
            var matchId   = Guid.NewGuid();
            var userId    = Guid.NewGuid();
            var stubMatch = new ApplicationCore.Models.Match.Match
            {
                Id       = matchId,
                HomeTeam = new TeamDetails()
                {
                    UserId = userId,
                },
                AwayTeam = new TeamDetails()
                {
                    UserId = Guid.NewGuid()
                }
            };
            var stubMatchList = new List <ApplicationCore.Models.Match.Match>()
            {
                stubMatch
            };

            var dbContextStub = new InMemoryDataContext <ApplicationCore.Models.Match.Match>(stubMatchList);

            // Act
            var repository = new MatchRepository(dbContextStub);
            var result     = await repository.GetAllAsync(0, 1, userId);

            //Assert
            Assert.Equal(stubMatch, result.First());
        }
        public async Task GetUnclaimedAsync_WhenUserHasAnUnclaimedMatch_ReturnsUnclaimedMatch()
        {
            var matchId   = Guid.NewGuid();
            var userId    = Guid.NewGuid();
            var stubMatch = new ApplicationCore.Models.Match.Match
            {
                Id       = matchId,
                HomeTeam = new TeamDetails()
                {
                    UserId            = userId,
                    HasClaimedRewards = false
                },
                AwayTeam = new TeamDetails()
                {
                    UserId = Guid.NewGuid()
                },
                KickOff = DateTime.Now.AddMinutes(-100)
            };
            var stubMatchList = new List <ApplicationCore.Models.Match.Match>()
            {
                stubMatch
            };

            var dbContextStub = new InMemoryDataContext <ApplicationCore.Models.Match.Match>(stubMatchList);

            // Act
            var repository = new MatchRepository(dbContextStub);
            var result     = await repository.GetUnclaimedAsync(userId);

            //Assert
            Assert.Equal(stubMatch, result.First());
        }
        public async Task GetInProgressAsync_WithMatchInProgressAsHomeTeam_ReturnsMatchId()
        {
            // Arrange
            var matchId   = Guid.NewGuid();
            var userId    = Guid.NewGuid();
            var stubMatch = new ApplicationCore.Models.Match.Match
            {
                Id       = matchId,
                HomeTeam = new TeamDetails()
                {
                    UserId = userId
                },
                AwayTeam = new TeamDetails()
                {
                    UserId = Guid.NewGuid()
                },
                KickOff = DateTime.Now.AddMinutes(-10)
            };
            var stubMatchList = new List <ApplicationCore.Models.Match.Match>()
            {
                stubMatch
            };

            var dbContextStub = new InMemoryDataContext <ApplicationCore.Models.Match.Match>(stubMatchList);

            // Act
            var repository = new MatchRepository(dbContextStub);
            var result     = await repository.GetInProgressAsync(userId);

            //Assert
            Assert.Equal(stubMatch.Id, result);
        }
        public async Task GetAllSync_WithMatchNotInvolvingUser_ReturnsEmptyList()
        {
            // Arrange
            var stubMatch = new ApplicationCore.Models.Match.Match
            {
                Id       = Guid.NewGuid(),
                HomeTeam = new TeamDetails()
                {
                    UserId = Guid.NewGuid()
                },
                AwayTeam = new TeamDetails()
                {
                    UserId = Guid.NewGuid()
                }
            };
            var stubMatchList = new List <ApplicationCore.Models.Match.Match>()
            {
                stubMatch
            };

            var dbContextStub = new InMemoryDataContext <ApplicationCore.Models.Match.Match>(stubMatchList);

            // Act
            var repository = new MatchRepository(dbContextStub);
            var result     = await repository.GetAllAsync(0, 1, Guid.NewGuid());

            //Assert
            Assert.False(result.Any());
        }
        public void DeleteEntityNotFoundTest()
        {
            var user1 = new User {
                Id        = Guid.NewGuid(),
                FirstName = "test1"
            };

            var user2 = new User {
                Id        = Guid.NewGuid(),
                FirstName = "test2"
            };

            var userList = new List <User> {
                user1,
                user2
            };

            var mockInitialiter = new Mock <IDatabaseInitializer>();

            mockInitialiter.Setup(x => x.InitializeTasks()).Returns(new List <Task>());
            mockInitialiter.Setup(x => x.InitializeUsers()).Returns(userList);

            var context = new InMemoryDataContext(mockInitialiter.Object);

            var user3 = new User {
                Id        = Guid.NewGuid(),
                FirstName = "user3"
            };

            context.DeleteEntity(user3);

            Assert.AreEqual(2, context.Users.Count());
        }
 private static InMemoryDataContext GetTestContext()
 {
     var inMemoryDataContext = new InMemoryDataContext();
     inMemoryDataContext.Add(new ExampleLeaf()
     {
         Id = 1,
         SecuredRoot = new ExampleRoot()
         {
             Id = 1,
             Name = "Example Root"
         }
     });
     inMemoryDataContext.Add(new ExampleLeaf()
     {
         Id = 2,
         SecuredRoot = new ExampleRoot()
         {
             Id = 2,
             Name = "Example Root"
         }
     });
     inMemoryDataContext.Add(new ExampleLeaf()
     {
         Id = 3,
         SecuredRoot = new ExampleRoot()
         {
             Id = 4,
             Name = "A First Record"
         }
     });
     inMemoryDataContext.Commit();
     return inMemoryDataContext;
 }
        public void GetEntityTest()
        {
            var testGuid = Guid.NewGuid();
            var testName = "test2";

            var userList = new List <User> {
                new User {
                    Id        = Guid.NewGuid(),
                    FirstName = "test1"
                },
                new User {
                    Id        = testGuid,
                    FirstName = testName
                }
            };

            var mockInitialiter = new Mock <IDatabaseInitializer>();

            mockInitialiter.Setup(x => x.InitializeTasks()).Returns(new List <Task>());
            mockInitialiter.Setup(x => x.InitializeUsers()).Returns(userList);

            var context = new InMemoryDataContext(mockInitialiter.Object);

            var result = context.GetEntity <User>(testGuid);

            Assert.AreEqual(testGuid, result.Id);
            Assert.AreEqual(testName, result.FirstName);
        }
        public void DeleteEntityInvalidTypeTest()
        {
            var user1 = new User {
                Id        = Guid.NewGuid(),
                FirstName = "test1"
            };

            var user2 = new User {
                Id        = Guid.NewGuid(),
                FirstName = "test2"
            };

            var userList = new List <User> {
                user1,
                user2
            };

            var mockInitialiter = new Mock <IDatabaseInitializer>();

            mockInitialiter.Setup(x => x.InitializeTasks()).Returns(new List <Task>());
            mockInitialiter.Setup(x => x.InitializeUsers()).Returns(userList);

            var context = new InMemoryDataContext(mockInitialiter.Object);

            var user3 = "test";

            context.DeleteEntity(user3);
        }
        public void GetEntityInvalidTypeTest()
        {
            var testGuid = Guid.NewGuid();
            var testName = "test2";

            var userList = new List <User> {
                new User {
                    Id        = Guid.NewGuid(),
                    FirstName = "test1"
                },
                new User {
                    Id        = testGuid,
                    FirstName = testName
                }
            };

            var mockInitialiter = new Mock <IDatabaseInitializer>();

            mockInitialiter.Setup(x => x.InitializeTasks()).Returns(new List <Task>());
            mockInitialiter.Setup(x => x.InitializeUsers()).Returns(userList);

            var context = new InMemoryDataContext(mockInitialiter.Object);

            context.GetEntity <string>(testGuid);
        }
        public ActionResult Distribution([FromServices] InMemoryDataContext context, [FromBody] DistributionRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                var useCase = new UseCase(
                    _logger,
                    new EmployeeAdapter(context),
                    new CalculationInfluenceAdapter(
                        new AreaCalculator(),
                        new SalaryCalculator(),
                        new AdmissionAtCalculator()
                        )
                    );
                var response = useCase.Execute(new Request(
                                                   request.AvailableValue
                                                   ));
                return(JsonResponse.Success((new DistributionPresenter(response)).Present()));
            }
            catch (InsufficientAvailableValueException exception)
            {
                return(JsonResponse.Error(exception.Message, 400));
            }
            catch (System.Exception exception)
            {
                return(JsonResponse.Error(exception.Message));
            }
        }
Esempio n. 12
0
        public SpeakerTestContext()
        {
            var context    = new InMemoryDataContext();
            var repository = new Repository(context);

            _speakerService = new SpeakerService(repository);
            _unitOfWork     = context;
        }
Esempio n. 13
0
        public static EventServiceContext GivenContext()
        {
            var inMemoryDataContext = new InMemoryDataContext();
            var repository          = new Repository(inMemoryDataContext);
            var eventService        = new EventService(repository);
            var fixture             = new Fixture();

            return(new EventServiceContext(inMemoryDataContext, repository, eventService, fixture));
        }
Esempio n. 14
0
 public BaseDataAccessTester()
 {
     _memoryDataContext = new InMemoryDataContext();
     AthleteDataAccess.ResolveDataContext = () => _memoryDataContext;
     UserDataAccess.ResolveDataContext = () => _memoryDataContext;
     ShoeDataAccess.ResolveDataContext = () => _memoryDataContext;
     RunDataAccess.ResolveDataContext = () => _memoryDataContext;
     WorkoutDataAcces.ResolveDataContext = () => _memoryDataContext;
 }
Esempio n. 15
0
        public async Task InsertExisting_Entity()
        {
            var context    = new InMemoryDataContext();
            var repository = new EntityFrameworkCoreRepository <Customer, InMemoryDataContext>(context);
            var newEntity  = await repository.Insert(new Customer()
            {
                Name = _entityDefaultName
            });

            var existing = await repository.Insert(newEntity);
        }
Esempio n. 16
0
        public async Task Insert_Entity()
        {
            var context    = new InMemoryDataContext();
            var repository = new EntityFrameworkCoreRepository <Customer, InMemoryDataContext>(context);
            var newEntity  = await repository.Insert(new Customer()
            {
                Name = _entityDefaultName
            });

            Assert.IsTrue(newEntity.ID > 0);
        }
Esempio n. 17
0
        public void WhenPassingBlankNameShouldThrowAnException(string name)
        {
            var dataContext = new InMemoryDataContext();
            var gateway     = new InMemoryDataGateway(dataContext);
            var useCase     = new Create(gateway);

            Assert.Throws <BusinessException>(() =>
            {
                var result = useCase.Execute(name);
            });
        }
Esempio n. 18
0
        public DownloadServiceTester()
        {
            RunTrackEnvironment.MappedFullyQualifiedDownloadDirectory =
                Environment.CurrentDirectory;
            RunTrackEnvironment.FullyQualifiedDownloadDirectoryUrl = "Foo";

            _inMemoryDataContext = new InMemoryDataContext();
            RunDataAccess.ResolveDataContext = () => _inMemoryDataContext;
            DownloadService.ResolveCsvData = () => new DummyCsvData();
            DownloadService.ResolveFileSystem = () => new DummyFileSystem();
        }
        public void GetAllEntitiesInvalidTypeTest()
        {
            var mockInitialiter = new Mock <IDatabaseInitializer>();

            mockInitialiter.Setup(x => x.InitializeTasks()).Returns(new List <Task>());
            mockInitialiter.Setup(x => x.InitializeUsers()).Returns(new List <User>());

            var context = new InMemoryDataContext(mockInitialiter.Object);

            context.GetAllEntities <string>();
        }
Esempio n. 20
0
        public void ShouldNotTryToMapAndThrowNullExceptionWhenAccessingGetterOnlyPropertyThatReferencesANullObject()
        {
            var context = new InMemoryDataContext();

            context.Add(new Parent());
            context.Commit();

            var models = new GetParents().Execute(context);

            models.Should().HaveCount(1);
        }
        public void ShouldAddDriverByName()
        {
            //arrange
            var context = new InMemoryDataContext();
            var service = new DriversEducationService(new Repository(context));

            //act
            service.AddDriver("Devlin");

            //assert
            context.AsQueryable<Driver>().Count(x => x.LastName == "Devlin").Should().Be(1);
        }
        private Repository SeededDatabase(IFixture fixture)
        {
            var context = new InMemoryDataContext();

            context.Add(fixture.Create <Account>());
            context.Add(fixture.Create <Account>());
            context.Add(fixture.Create <Account>());

            context.Commit();

            return(new Repository(context));
        }
Esempio n. 23
0
        public new static CarServiceContext GivenContext()
        {
            AutoMapperInitializor.Init();

            var inMemoryDataContext = new InMemoryDataContext();
            var repository          = new Repository(inMemoryDataContext);
            var eventService        = new EventService(repository);
            var carService          = new CarService(repository);
            var fixture             = new Fixture();

            return(new CarServiceContext(fixture, repository, carService, inMemoryDataContext, eventService));
        }
Esempio n. 24
0
        public void CanCreateUser()
        {
            var context     = new InMemoryDataContext();
            var userService = new UserService(new Repository(context));

            User user = userService.CreateUser(
                "*****@*****.**");

            context.Commit();

            user.UserId.Should().NotBe(0);
            user.Email.Should().Be("*****@*****.**");
        }
Esempio n. 25
0
        public async Task GetByName_Entity()
        {
            var context    = new InMemoryDataContext();
            var repository = new EntityFrameworkCoreRepository <Customer, InMemoryDataContext>(context);
            var newEntity  = await repository.Insert(new Customer()
            {
                Name = _entityDefaultName
            });

            var existing = await repository.Get(x => x.Name == _entityDefaultName);

            Assert.IsNotNull(existing);
        }
        public void ShouldPopulateSingleReference()
        {
            var context = new InMemoryDataContext();

            var child = new Post();
            var blog = new Blog("Test");
            blog.Posts.Add(child);

            context.Add(blog);
            context.Commit();

            Assert.IsNotNull(child.Blog);
        }
        public void ShouldPopulateCollectionBasedReference()
        {
            var context = new InMemoryDataContext();

            var child = new Post();
            var blog = new Blog("Test");
            child.Blog = blog;

            context.Add(child);
            context.Commit();

            Assert.AreEqual(1, blog.Posts.Count(x => x == child));
        }
Esempio n. 28
0
        public void ShouldAddDriverByName()
        {
            //arrange
            var context = new InMemoryDataContext();
            var service = new DriversEducationService(new Repository(context));

            //act
            service.AddDriver("Devlin");
            context.Commit();

            //assert
            context.AsQueryable <Driver>().Count(x => x.LastName == "Devlin").Should().Be(1);
        }
        public void AddEntityInvalidTypeTest()
        {
            var mockInitialiter = new Mock <IDatabaseInitializer>();

            mockInitialiter.Setup(x => x.InitializeTasks()).Returns(new List <Task>());
            mockInitialiter.Setup(x => x.InitializeUsers()).Returns(new List <User>());

            var context = new InMemoryDataContext(mockInitialiter.Object);

            var testObj = "test";

            context.AddEntity(testObj);
        }
        public void ShouldPopulateSingleReference()
        {
            var context = new InMemoryDataContext();

            var child = new Post();
            var blog  = new Blog("Test");

            blog.Posts.Add(child);

            context.Add(blog);
            context.Commit();

            Assert.IsNotNull(child.Blog);
        }
        public void ShouldPopulateCollectionBasedReference()
        {
            var context = new InMemoryDataContext();

            var child = new Post();
            var blog  = new Blog("Test");

            child.Blog = blog;

            context.Add(child);
            context.Commit();

            Assert.AreEqual(1, blog.Posts.Count(x => x == child));
        }
        public void ShouldQueryDriversByName()
        {
            //arrange 
            var context = new InMemoryDataContext();
            context.Add(new Driver("Devlin", "Liles"));
            context.Add(new Driver("Tim", "Rayburn"));

            var service = new DriversEducationService(new Repository(context));

            //act
            Driver driver = service.GetDriver("Liles");

            //assert
            driver.Should().NotBeNull();
        }
        public void ShouldPopulateBackReferenceCollections()
        {
            // Arrange
            var context = new InMemoryDataContext();
            var blog = new Blog();
            var post = new Post { Blog = blog };
            context.Add(post);
            context.Commit();

            // Act
            var fetchedBlog = context.AsQueryable<Blog>().First();

            // Assert
            fetchedBlog.Posts.Count().Should().Be(1);
        }
Esempio n. 34
0
        public async Task GetInProgressAsync_WithNoMatchInProgress_ReturnsNull()
        {
            // Arrange
            var userId        = Guid.NewGuid();
            var stubMatchList = new List <ApplicationCore.Models.Match.Match>();

            var dbContextStub = new InMemoryDataContext <ApplicationCore.Models.Match.Match>(stubMatchList);

            // Act
            var repository = new MatchRepository(dbContextStub);
            var result     = await repository.GetInProgressAsync(userId);

            //Assert
            Assert.Equal((Guid?)null, result);
        }
Esempio n. 35
0
        public async Task DeleteByID_Entity()
        {
            var context    = new InMemoryDataContext();
            var repository = new EntityFrameworkCoreRepository <Customer, InMemoryDataContext>(context);
            var newEntity  = await repository.Insert(new Customer()
            {
                Name = _entityDefaultName
            });

            await repository.Delete(newEntity.ID);

            var existing = await repository.Get(newEntity.ID);

            Assert.IsNull(existing);
        }
        public void SetUp()
        {
            model = new CustomerModel()
            {
                Customers = A.CreateDummyCustomerModel(),
            };

            context = new InMemoryDataContext();
            repo = new Repository(context);
            customerController = new CustomerController(repo);

            //mockRepo = Mock.Of<IRepository>();
            //Mock.Get(mockRepo)
            //    .Setup(r => r.Context)
            //    .Returns(mockContext);
        }
Esempio n. 37
0
        public void ShouldGetACollectionWithoutItems()
        {
            // Fake data context
            var dataContext = new InMemoryDataContext()
            {
                Items = new List <ToDoItem>()
            };
            var dataGateway = new InMemoryDataGateway(dataContext);

            // Get items
            var listUseCase = new List(dataGateway);
            var items       = listUseCase.Execute();

            Assert.NotNull(items);
            Assert.True(items.Count == 0);
        }
Esempio n. 38
0
        private void InitializeCartWithOneItem(InMemoryDataContext context)
        {
            var user = context.Add(User.Create("*****@*****.**"));

            context.Commit();
            var cart        = context.Add(Cart.Create(user));
            var catalogItem = context.Add(CatalogItem.Create
                                          (
                                              sku: "CAFE-314",
                                              description: "1 Pound Guatemalan Coffee Beans",
                                              unitPrice: 18.80m
                                          ));

            cart.AddItem(catalogItem, 2);
            context.Commit();
        }
Esempio n. 39
0
        public void CanLoadCartWithNoItems()
        {
            var context     = new InMemoryDataContext();
            var repository  = new Repository(context);
            var userService = new UserService(repository);
            var cartService = GivenCartService(repository);

            var user = userService.CreateUser("*****@*****.**");

            context.Commit();
            var cart = cartService.GetCartForUser(user);

            context.Commit();

            cart.CartItems.Count().Should().Be(0);
        }
Esempio n. 40
0
        public void Setup()
        {
            context = new InMemoryDataContext();
            repo = new Repository(context);

            // All tests will fail if the Create does not work
            repo.Context.Add(new Customer
            {
                FirstName = "Kevin",
                LastName = "Berry",
                Company = new Company("Improving Enterprises"),
                Email = "*****@*****.**",
                Phone = "(555)123-4567"
            });
            repo.Context.Commit();

            customerK = repo.Find(new FindCustomerByFirstName("Kevin")).First();
        }
        public void Setup()
        {
            context = new InMemoryDataContext();
            repo = new Repository(context);

            newCustomer = new Customer()
            {
                FirstName = "K Bob",
                LastName = "Jr.",
                Company = new Company("make things, inc."),
                Email = "*****@*****.**",
                Phone = "(555)123-4567"
            };

            repo.Context.Add(newCustomer);
            repo.Context.Commit();

            controller = new HomeController(repo);
        }
        public void ShouldPopulateBackReferenceSingleProperty()
        {
            // Arrange
            var context = new InMemoryDataContext();
            var blog = new Blog()
            {
                Posts = new List<Post>()
                {
                    new Post()
                }
            };
            context.Add(blog);
            context.Commit();

            // Act
            var fetchedPost = context.AsQueryable<Post>().First();

            // Assert
            fetchedPost.Blog.Should().NotBeNull();
        }
Esempio n. 43
0
 public void Init()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     repository = new UserRepository { DataContext = dc, DataContextFactory = dcf };
 }
Esempio n. 44
0
 private BlogCommentRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     return new BlogCommentRepository { DataContext = dc, DataContextFactory = dcf };
 }
Esempio n. 45
0
 public IRepository<LeaveItem> CreateRepository()
 {
     _dataContext = new InMemoryDataContext<LeaveItem>();
     return new InMemoryRepository<LeaveItem>(_dataContext);
 }
Esempio n. 46
0
 private FamilyRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     return new FamilyRepository { DataContext = dc, DataContextFactory = dcf };
 }
 public void SetUp()
 {
     context = new InMemoryActiveDataContext();
     repo = new Repository(context);
     customerController = new CustomerController(repo);
 }
Esempio n. 48
0
 private BlogRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     var titleCleaner = MockRepository.GenerateMock<ITitleCleaner>();
     return new BlogRepository { DataContext = dc, DataContextFactory = dcf, TitleCleaner = titleCleaner, Cache = new InMemoryCache() };
 }
 public void Setup()
 {
     _context = new InMemoryDataContext();
 }
Esempio n. 50
0
 private BlogRepository GetPersister()
 {
     var dc = new InMemoryDataContext();
     var dcf = new InMemoryDataContextFactory { DataContext = dc };
     var titleCleaner = MockRepository.GenerateMock<ITitleCleaner>();
     var blogCommentRepository = MockRepository.GenerateMock<IModelLister<IBlogComment, int>>();
     return new BlogRepository { DataContext = dc, DataContextFactory = dcf, TitleCleaner = titleCleaner, BlogCommentRepository = blogCommentRepository };
 }
Esempio n. 51
0
 private IRepository<LeaveItem> CreateRepository()
 {
     var dataContext = new InMemoryDataContext<LeaveItem>();
     return new InMemoryRepository<LeaveItem>(dataContext);
 }
        public void Setup()
        {
            context = new InMemoryDataContext();
            hwyRepo = new Repository(context);

            customer1 = new Customer()
            {
                Id = 1,
                FirstName = "ajim",
                LastName = "bob",
                Company = new Company("aCompany") { Id = 1 },
                Email = "*****@*****.**",
                Phone = "(555)123-1142",
                BillingAddress = new CustomerBillingAddress()
                {
                    Street1 = "123 some street",
                    City = "awesome city",
                    State = "TX",
                    ZipCode = "75001"
                }
            };

            customer2 = new Customer()
            {
                Id = 2,
                FirstName = "bjim",
                LastName = "bob",
                Company = new Company("bCompany") { Id = 2 },
                Email = "*****@*****.**",
                Phone = "(555)123-1242",
                BillingAddress = new CustomerBillingAddress()
                {
                    Street1 = "223 some street",
                    City = "awesome city",
                    State = "TX",
                    ZipCode = "75001"
                }
            };

            customer3 = new Customer()
            {
                Id = 3,
                FirstName = "cjim",
                LastName = "bob",
                Company = new Company("cCompany") { Id = 3 },
                Email = "*****@*****.**",
                Phone = "(555)123-1342",
                BillingAddress = new CustomerBillingAddress()
                {
                    Street1 = "323 some street",
                    City = "awesome city",
                    State = "TX",
                    ZipCode = "75001"
                }
            };

            hwyRepo.Context.Add(customer1);
            hwyRepo.Context.Add(customer2);
            hwyRepo.Context.Add(customer3);
            hwyRepo.Context.Commit();
        }