Example #1
0
        public void AssertDefaultAthleteForNewUser()
        {
            var userDataAccess = new UserDataAccess();
            MemoryDataContext.Clear();
            const string email = "*****@*****.**";
            const string password = "******";

            var user = userDataAccess.CreateUserWithDefaultAthlete(email, password);

            var athleteDataAccess = new AthleteDataAccess();
            var athlete = athleteDataAccess.GetAthlete(user);
            Assert.AreEqual(user, athlete.User);
        }
Example #2
0
        public void AssertUserDataIsSet()
        {
            var userDataAccess = new UserDataAccess();
            MemoryDataContext.Clear();
            const string email = "*****@*****.**";
            const string password = "******";

            var user = userDataAccess.CreateUserWithDefaultAthlete(email, password);

            Assert.AreEqual(email, user.UserName);
            Assert.AreEqual(password, user.Password);
            Assert.AreEqual(3, MemoryDataContext.CommitCallCount);
            Assert.AreEqual(user.CustomerID, user.ID.ToString());
        }