private static (Users, User) CreateLoggedInSeller()
        {
            var userTest = new UserTest();

            var(users, scott) = userTest.SetupScott(true);
            users.MakeSeller(scott);
            users.Login(scott.UserName, scott.Password);
            return(users, scott);
        }
        public void TestCantCreateAuctionIfUserNotSeller()
        {
            var userTest = new UserTest();

            var(users, scott) = userTest.SetupScott(true);
            users.Login(scott.UserName, scott.Password);
            var startTime = DateTime.Now.AddSeconds(1.0);
            var endTime   = DateTime.Now.AddSeconds(3.0);

            Assert.ThrowsException <Exception>(() => new Auction(scott, "item description", 10, startTime, endTime));
        }
        public void TestCantCreateAuctionIfNotLoggedIn()
        {
            var userTest = new UserTest();

            var(users, scott) = userTest.SetupScott(true);
            // check if user is a seller
            var startTime = DateTime.Now.AddSeconds(1.0);
            var endTime   = DateTime.Now.AddSeconds(3.0);

            Assert.ThrowsException <UserNotLoggedInException>(() =>
                                                              new Auction(scott, "item description", 10, startTime, endTime));
        }