Ejemplo n.º 1
0
        public async Task GetClosedAuctions_ReturnsListOfAuctionsWithinTimePeriod(int startYear, int startMonth, int startDay, int endYear, int endMonth, int endDay, int expectedCount, bool isOwnAction)
        {
            var groupCode = 1;
            //arrange
            var mocks    = CreateMocksForGetClosedAuctionsTests(groupCode, "FirstName", "LastName", "UserName", "AnnanAnvändare");
            var auctions = new Auctions(mocks.MockRepo.Object, mocks.MockUserManager.Object);
            //act
            var result = await auctions.GetClosedAuctions(groupCode, new DateTime(startYear, startMonth, startDay),
                                                          new DateTime(endYear, endMonth, endDay), mocks.MockUser.Object, isOwnAction);

            //assert
            Assert.Equal(expectedCount, result.Count);
        }