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); }
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); }
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); }
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); }
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); }
private IQueryable <Game> GetDbSetGames(List <Game> tables) { return(MockDbSet.GetDataSet(tables).Object); }
private IQueryable <Figure> GetDbSetFigures(List <Figure> figures) { return(MockDbSet.GetDataSet(figures).Object); }
private IQueryable <ApplicationUser> GetDbSetUsers(List <ApplicationUser> users) { return(MockDbSet.GetDataSet(users).Object); }