Esempio n. 1
0
 public void Initialize()
 {
     Site = CreateAndLoadSite(-5, "site for user tests", 360, 7, out AlarmClock);
     Site.CreateUser(UserName, Pw);
     User    = Site.GetUsers().SingleOrDefault(u => u.Username == UserName);
     Session = Site.Login(UserName, Pw);
     Assert.That(User, Is.Not.Null, "Set up should be successful");
 }
Esempio n. 2
0
        public void SiteUSersAuctionInitialize()
        {
            const int timeZone = -2;

            siteFactory.CreateSiteOnDb(connectionString, SiteName, timeZone, 300, 7);
            AlarmClockMock(timeZone, out AlarmClock);
            Site       = siteFactory.LoadSite(connectionString, SiteName, AlarmClock.Object);
            Seller     = CreateAndLogUser("seller", out SellerSession, Site);
            Bidder1    = CreateAndLogUser("bidder1", out Bidder1Session, Site);
            Bidder2    = CreateAndLogUser("bidder2", out Bidder2Session, Site);
            TheAuction = SellerSession.CreateAuction("Beautiful object to be desired by everybody",
                                                     AlarmClock.Object.Now.AddDays(7), 5);
        }
Esempio n. 3
0
 protected IUser CreateAndLogUser(string username, out ISession session, TAP2018_19.AuctionSite.Interfaces.ISite site)
 {
     site.CreateUser(username, username);
     session = site.Login(username, username);
     return(site.GetUsers().FirstOrDefault(u => u.Username == username));
 }