public async Task Then_Gets_Count_From_Context_Of_All_Standards(
            [StandardsAreLarsValid] List <Standard> activeValidStandards,
            [StandardsNotLarsValid] List <Standard> activeInvalidStandards,
            [StandardsNotYetApproved] List <Standard> notYetApprovedStandards,
            [StandardsWithdrawn] List <Standard> withdrawnStandards,
            [StandardsRetired] List <Standard> retiredStandards,
            [Frozen] Mock <ICoursesDataContext> mockDataContext,
            Data.Repository.StandardRepository repository)
        {
            var allStandards = new List <Standard>();

            allStandards.AddRange(activeValidStandards);
            allStandards.AddRange(activeInvalidStandards);
            allStandards.AddRange(notYetApprovedStandards);
            allStandards.AddRange(withdrawnStandards);
            allStandards.AddRange(retiredStandards);
            mockDataContext
            .Setup(context => context.Standards)
            .ReturnsDbSet(allStandards);

            var count = await repository.Count(StandardFilter.None);

            var total = activeInvalidStandards.Count + activeInvalidStandards.Count + notYetApprovedStandards.Count
                        + withdrawnStandards.Count + retiredStandards.Count;

            count.Should().Be(total);
        }
        public async Task Then_Gets_Count_From_Context_Of_Active_Standards_Including_Retired_With_Distinct_LarsCode(
            [StandardsAreLarsValid] List <Standard> activeValidStandards,
            [StandardsNotLarsValid] List <Standard> activeInvalidStandards,
            [StandardsNotYetApproved] List <Standard> notYetApprovedStandards,
            [StandardsWithdrawn] List <Standard> withdrawnStandards,
            [StandardsRetired] List <Standard> retiredStandards,
            [Frozen] Mock <ICoursesDataContext> mockDataContext,
            Data.Repository.StandardRepository repository)
        {
            var allStandards = new List <Standard>();

            allStandards.AddRange(activeValidStandards);
            allStandards.AddRange(activeInvalidStandards);
            allStandards.AddRange(notYetApprovedStandards);
            allStandards.AddRange(withdrawnStandards);
            allStandards.AddRange(retiredStandards);

            //set up active version
            var newActiveVersion = activeValidStandards.First();

            newActiveVersion.IfateReferenceNumber = "ST0001";
            newActiveVersion.Version  = 2;
            newActiveVersion.LarsCode = 100002;

            //add a retired version to have same IfateReferenceNumber and different LarsCode
            allStandards.Add(activeValidStandards.Select(x => new Standard {
                IfateReferenceNumber = x.IfateReferenceNumber, Status = "Retired", LarsCode = 100001, Version = 1, LarsStandard = newActiveVersion.LarsStandard
            }).First());

            mockDataContext
            .Setup(context => context.Standards)
            .ReturnsDbSet(allStandards);

            var count = await repository.Count(StandardFilter.Active);

            count.Should().Be(activeValidStandards.Count + activeInvalidStandards.Count + retiredStandards.Count + 1);
        }