public void CreateUser_ValidArgs_CreateUser_Without_Session() { const string username = "******"; const string password = "******"; Site.CreateUser(username, password); var newUserSessions = Site.GetSessions().Where(s => s.User.Username == username); Assert.That(newUserSessions, Is.Empty); }
public void LoadSite_ValidArg_ReturnsFullSite6() { newSite = siteFactory.LoadSite(connectionString, siteName, alarmClockMoq.Object); var sessionList = newSite.GetSessions().ToList(); Assert.That(sessionList, Is.EquivalentTo(expectedSessionList)); var aliceSession = sessionList.SingleOrDefault(s => s.User.Username == alice); Assert.That(aliceSession.ValidUntil, Is.GreaterThan(alarmClockMoq.Object.Now.AddHours(1))); var barbaraSession = sessionList.SingleOrDefault(s => s.User.Username == barbara); Assert.That(barbaraSession.ValidUntil, Is.GreaterThan(alarmClockMoq.Object.Now.AddMinutes(30))); }
public void SetUpSiteWithSessions() { userList = new List <string> { alice, barbara, "Carlotta", "Dalila" }; loggedUserList = new List <string> { barbara, alice }; newSite = CreateAndLoadSite(timeZone, siteName, sessionExpirationTimeInSeconds, minimumBidIncrement, userList, loggedUserList, 1800, out expectedSessionList, out alarmClockMoq); sessionList = newSite.GetSessions().ToList(); aliceSession = sessionList.SingleOrDefault(s => s.User.Username == alice); barbaraSession = sessionList.SingleOrDefault(s => s.User.Username == barbara); }
public void LoadSite_ValidArg_ReturnsSiteWithUsers7() { Assert.That(newSite.GetSessions(), Is.EquivalentTo(new List <ISession>())); }
public void OnDelete_Delete_User_Session() { SetNowToFutureTime(SecondsInADay * 3 + 1, AlarmClock); Seller.Delete(); Assert.That(Site.GetSessions(), Is.Empty); }
public void GetSessions_ValidArg_ReturnsEmpty() { var sessions = Site.GetSessions(); Assert.That(sessions, Is.Empty); }