public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            db            = contextHelpers.getDbContext();
            search        = new WorkoutSearch();
            myWorkoutsCon = new MyWorkoutsController(db.Object)
            {
                ControllerContext = MockContext.AuthenticationContext("jjones")
            };
            myWorkoutsCon.pageSize = 10;

            ts       = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 };
            uWorkout = new user_workout()
            {
                id = 1,
                number_of_ex_completed = 0,
                workout_id             = 1,
                user_id   = 2,
                timestamp = ts,
                workout   = new workout()
                {
                    workout_exercise = new List <workout_exercise>
                    {
                        { new workout_exercise() },
                        { new workout_exercise() },
                        { new workout_exercise() },
                        { new workout_exercise() },
                    }
                }
            };
        }
Example #2
0
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            db          = contextHelpers.getDbContext();
            recommender = new Recommender(db.Object);
        }
Example #3
0
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            db           = contextHelpers.getDbContext();
            myProfileCon = new MyProfileController(db.Object)
            {
                ControllerContext = MockContext.AuthenticationContext("jjones")
            };
        }
Example #4
0
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            db         = contextHelpers.getDbContext();
            controller = new WorkoutRatingController(db.Object)
            {
                ControllerContext = MockContext.AuthenticationContext("jjones")
            };
        }
Example #5
0
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            db = contextHelpers.getDbContext();

            myAccountCon = new MyAccountController(db.Object);
            //{
            //   ControllerContext = MockContext.AuthenticationContext("jjones")
            //};
        }
Example #6
0
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            search = new TypeSearch();

            db       = contextHelpers.getDbContext();
            adminCon = new AdminTypesController(db.Object)
            {
                // sign in as admin
                ControllerContext = MockContext.AuthenticationContext("admin")
            };
        }
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            search = new WorkoutSearch();

            db         = contextHelpers.getDbContext();
            controller = new HomeController(db.Object)
            {
                ControllerContext = MockContext.AuthenticationContext("jjones")
            };
            controller.pageSize = 10;
        }