Example #1
0
        public async Task Join_NewUser_CreateLeagueUser()
        {
            var user    = DbContextUtility.AddNew <ApplicationUser>(dbContext);
            var league1 = LeagueUtility.CreateLeague(dbContext);
            var league2 = LeagueUtility.CreateLeague(dbContext);

            await testObj.Join(league1.ID, user.Id);

            var leagueUser = await testObj.Join(league2.ID, user.Id);

            Assert.AreEqual(user.Id, leagueUser.UserID);
            Assert.AreEqual(league2.ID, leagueUser.LeagueID);
        }