Esempio n. 1
0
        public MockApplicationContext MockGames()
        {
            Mock <DbSet <Game> > mockGame = MockDbSet.GetDataSet(new List <Game> {
                ServiceDataToUse.Game
            });

            GamesSetup(mockGame);
            Games = mockGame.Object;

            Setup(m => m.Games)
            .Returns(Games);
            return(this);
        }
Esempio n. 2
0
        public MockApplicationContext MockFigures()
        {
            Mock <DbSet <Figure> > mockFigure = MockDbSet.GetDataSet(new List <Figure> {
                ServiceDataToUse.Figure
            });

            FiguresSetup(mockFigure);
            Figures = mockFigure.Object;

            Setup(m => m.Figures)
            .Returns(Figures);
            return(this);
        }
Esempio n. 3
0
        public MockApplicationContext MockPlayerProfiles()
        {
            Mock <DbSet <PlayerProfile> > mockPlayerProfiles = MockDbSet.GetDataSet(new List <PlayerProfile> {
                ServiceDataToUse.User.PlayerProfile
            });

            PlayerprofileSetup(mockPlayerProfiles);
            PlayerProfiles = mockPlayerProfiles.Object;

            Setup(m => m.PlayerProfile)
            .Returns(PlayerProfiles);
            return(this);
        }
Esempio n. 4
0
        public MockApplicationContext MockUsers()
        {
            Mock <DbSet <ApplicationUser> > mockUser = MockDbSet.GetDataSet(new List <ApplicationUser> {
                ServiceDataToUse.User
            });

            UsersSetup(mockUser);
            Users = mockUser.Object;

            Setup(m => m.Users)
            .Returns(Users);
            return(this);
        }
Esempio n. 5
0
        public MockApplicationContext MockTables()
        {
            Mock <DbSet <Table> > mockTable = MockDbSet.GetDataSet(new List <Table> {
                ServiceDataToUse.Table
            });

            TablesSetup(mockTable);
            Tables = mockTable.Object;

            Setup(m => m.Tables)
            .Returns(Tables);
            return(this);
        }
Esempio n. 6
0
 private IQueryable <Game> GetDbSetGames(List <Game> tables)
 {
     return(MockDbSet.GetDataSet(tables).Object);
 }
Esempio n. 7
0
 private IQueryable <Figure> GetDbSetFigures(List <Figure> figures)
 {
     return(MockDbSet.GetDataSet(figures).Object);
 }
Esempio n. 8
0
 private IQueryable <ApplicationUser> GetDbSetUsers(List <ApplicationUser> users)
 {
     return(MockDbSet.GetDataSet(users).Object);
 }