示例#1
0
        public void GetAllBidsForListing_ReturnsABidListOfLengthZero_WhenListingIdIsPassedAndDatabaseIsEmpty()
        {
            // Arrange
            int expected = 0;
            int id       = 1;
            SqlServerBidRepository bidRepo = new SqlServerBidRepository(context);

            // Act
            int actual = bidRepo.GetAllBidsForListing(id).Count();

            // Assert
            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void GetAllBidsForListing_ReturnsABidListOfLengthOne_WhenUserIdOneIsPassedAndIsPresentInDatabase()
        {
            // Arrange
            int expected = 1;
            int id       = 1;

            InsertData();
            SqlServerBidRepository bidRepo = new SqlServerBidRepository(context);

            // Act
            int actual = bidRepo.GetAllBidsForListing(id).Count();

            // Assert
            Assert.AreEqual(expected, actual);
        }