コード例 #1
0
        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()},
                    }
                }
            };
        }
コード例 #2
0
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            db = contextHelpers.getDbContext();
            myProfileCon = new MyProfileController(db.Object)
            {
                ControllerContext = MockContext.AuthenticationContext("jjones")
            };
        }
コード例 #3
0
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            db = contextHelpers.getDbContext();
            controller = new WorkoutRatingController(db.Object)
            {
                ControllerContext = MockContext.AuthenticationContext("jjones")
            };
        }
コード例 #4
0
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();

            db = contextHelpers.getDbContext();

            myAccountCon = new MyAccountController(db.Object);
            //{
             //   ControllerContext = MockContext.AuthenticationContext("jjones")
            //};
        }
コード例 #5
0
        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;
        }
コード例 #6
0
        public void Initialize()
        {
            DbContextHelpers contextHelpers = new DbContextHelpers();
            search = new CategorySearch();

            db = contextHelpers.getDbContext();
            adminCon = new AdminCategoriesController(db.Object)
            {
                // sign in as admin
                ControllerContext = MockContext.AuthenticationContext("admin")
            };
        }
コード例 #7
0
 public void Initialize()
 {
     DbContextHelpers contextHelpers = new DbContextHelpers();
     db = contextHelpers.getDbContext();
     recommender = new Recommender(db.Object);
 }