Ejemplo n.º 1
0
 // The constructor accepts an IConfiguration object as a parameter. This class comes from the ASP.NET framework and is useful for retrieving things out of the appsettings.json file like connection strings.
 public WalkersController(IConfiguration config)
 {
     _walkerRepo = new WalkerRepository(config);
     _ownerRepo  = new OwnerRepository(config);
     _dogRepo    = new DogRepository(config);
     _walkRepo   = new WalkRepository(config);
 }
Ejemplo n.º 2
0
 public OwnersController(IConfiguration config)
 {
     _ownerRepo        = new OwnerRepository(config);
     _dogRepo          = new DogRepository(config);
     _walkerRepo       = new WalkRepository(config);
     _neighborhoodRepo = new NeighborhoodRepository(config);
 }
Ejemplo n.º 3
0
 public void Cleanup()
 {
     mock_context      = null;
     mock_group_set    = null;
     mock_family_set   = null;
     mock_member_set   = null;
     mock_activity_set = null;
     repository        = null;
 }
Ejemplo n.º 4
0
 public void Initialize()
 {
     mock_context      = new Mock <WalkContext>();
     mock_group_set    = new Mock <DbSet <Group> >();
     mock_family_set   = new Mock <DbSet <Family> >();
     mock_member_set   = new Mock <DbSet <Member> >();
     mock_activity_set = new Mock <DbSet <Activities> >();
     repository        = new WalkRepository(mock_context.Object);
     test_user         = new ApplicationUser {
         Email = "*****@*****.**", Id = "myid-whoo"
     };
 }
Ejemplo n.º 5
0
 // The constructor accepts an IConfiguration object as a parameter. This class comes from the ASP.NET framework and is useful for retrieving things out of the appsettings.json file like connection strings.
 public WalksController(IConfiguration config)
 {
     _walkRepo = new WalkRepository(config);
 }
Ejemplo n.º 6
0
        public void WalkRepositoryEnsureCanCreateRepository()
        {
            WalkRepository repository = new WalkRepository();

            Assert.IsNotNull(repository);
        }