public SampleItemsSearchRepoTests()
        {
            GoodItemKey = 2343;
            GoodBankKey = 8398;
            BadItemKey  = 9234;
            BadBankKey  = 1123;
            Claim1      = new Claim("claim1", "1", "ELA Claim 1");
            Claim2      = new Claim("claim2", "2", "Math Claim 1");
            ItMath      = new InteractionType("2", "Math Itype", "", 2);
            ItEla       = new InteractionType("1", "Ela Itype", "", 1);
            Math        = Subject.Create("Math", "Mathematics", "Math", ImmutableArray.Create(Claim2), ImmutableArray.Create(ItMath.Code));
            Ela         = Subject.Create("ELA", "English", "ELA", ImmutableArray.Create(Claim1), ImmutableArray.Create(ItEla.Code));
            var interactionTypes = ImmutableArray.Create(ItEla, ItMath);
            var subjects         = ImmutableArray.Create(Ela, Math);
            var itemCards        = ImmutableArray.Create(
                ItemCardViewModel.Create(bankKey: GoodBankKey, itemKey: GoodItemKey, grade: GradeLevels.Grade6,
                                         subjectCode: Math.Code, interactionTypeCode: ItMath.Code, claimCode: Claim1.Code),
                ItemCardViewModel.Create(bankKey: GoodBankKey, itemKey: BadItemKey, grade: GradeLevels.High,
                                         subjectCode: Math.Code, interactionTypeCode: ItMath.Code, claimCode: Claim2.Code),
                ItemCardViewModel.Create(bankKey: BadBankKey, itemKey: GoodItemKey, grade: GradeLevels.Grade9,
                                         subjectCode: Ela.Code, interactionTypeCode: ItEla.Code, claimCode: Claim1.Code),
                ItemCardViewModel.Create(bankKey: BadBankKey, itemKey: BadItemKey, grade: GradeLevels.Grade4,
                                         subjectCode: Ela.Code, interactionTypeCode: ItEla.Code, claimCode: Claim2.Code),
                ItemCardViewModel.Create(bankKey: 1, itemKey: 2, grade: GradeLevels.Grade12)
                );

            Context = SampleItemsContext.Create(itemCards: itemCards, subjects: subjects, interactionTypes: interactionTypes);

            var loggerFactory = new Mock <ILoggerFactory>();
            var logger        = new Mock <ILogger>();

            loggerFactory.Setup(lf => lf.CreateLogger(It.IsAny <string>())).Returns(logger.Object);

            SampleItemsSearchRepo = new SampleItemsSearchRepo(Context, loggerFactory.Object);
        }
        public ItemViewRepoTests()
        {
            GoodBankKey      = 1;
            BadBankKey       = 3;
            BadItemKey       = 9;
            GoodItemKey      = 4;
            DuplicateBankKey = 5;
            DuplicateItemKey = 6;
            MathCard         = ItemCardViewModel.Create(bankKey: GoodBankKey, itemKey: GoodItemKey);
            ElaCard          = ItemCardViewModel.Create(bankKey: BadBankKey, itemKey: BadItemKey);
            DuplicateCard    = ItemCardViewModel.Create(bankKey: DuplicateBankKey, itemKey: DuplicateItemKey);
            MathDigest       = SampleItem.Create(bankKey: GoodBankKey, itemKey: GoodItemKey);
            ElaDigest        = SampleItem.Create(bankKey: BadBankKey, itemKey: BadItemKey);

            fieldTestUseVar                = new FieldTestUse();
            fieldTestUseVar.Code           = "ELA";
            fieldTestUseVar.QuestionNumber = 1;

            DuplicateDigest = SampleItem.Create(bankKey: GoodBankKey, itemKey: DuplicateItemKey);
            var duplicateDigest2 = SampleItem.Create(bankKey: GoodBankKey, itemKey: DuplicateItemKey);

            PerformanceDigest          = SampleItem.Create(bankKey: GoodBankKey, itemKey: 209, isPerformanceItem: true, associatedStimulus: 1, fieldTestUse: fieldTestUseVar);
            PerformanceDigestDuplicate = SampleItem.Create(bankKey: DuplicateBankKey, itemKey: 210, isPerformanceItem: true, associatedStimulus: 1, fieldTestUse: fieldTestUseVar);

            BrailleItem = SampleItem.Create(bankKey: GoodBankKey, itemKey: 211, isPerformanceItem: true, associatedStimulus: 1,
                                            fieldTestUse: fieldTestUseVar,
                                            brailleOnlyItem: false,
                                            brailleItemCodes: ImmutableArray.Create("123"),
                                            braillePassageCodes: ImmutableArray.Create("123"));

            BrailleItemDuplicate = SampleItem.Create(bankKey: DuplicateBankKey, itemKey: 212, isPerformanceItem: true, associatedStimulus: 1,
                                                     fieldTestUse: fieldTestUseVar,
                                                     brailleOnlyItem: false,
                                                     brailleItemCodes: ImmutableArray.Create("123"),
                                                     braillePassageCodes: ImmutableArray.Create("123"));

            BrailleItemReplace = SampleItem.Create(bankKey: DuplicateBankKey, itemKey: 213, isPerformanceItem: true, associatedStimulus: 2,
                                                   fieldTestUse: fieldTestUseVar,
                                                   brailleOnlyItem: true,
                                                   brailleItemCodes: ImmutableArray.Create("123"),
                                                   braillePassageCodes: ImmutableArray.Create("123"),
                                                   copiedFromItem: 211);

            SampleItems = ImmutableArray.Create(MathDigest, ElaDigest, DuplicateDigest, DuplicateDigest, DuplicateDigest, PerformanceDigest, PerformanceDigestDuplicate, BrailleItem, BrailleItemDuplicate, BrailleItemReplace);
            var itemCards = ImmutableArray.Create(MathCard, ElaCard, DuplicateCard, DuplicateCard, DuplicateCard);

            Math = new Subject("Math", "", "", new ImmutableArray <Claim>()
            {
            }, new ImmutableArray <string>()
            {
            });
            Ela = new Subject("ELA", "", "", new ImmutableArray <Claim>()
            {
            }, new ImmutableArray <string>()
            {
            });
            NotASubject = new Subject("NotASubject", "", "", new ImmutableArray <Claim>()
            {
            }, new ImmutableArray <string>()
            {
            });
            Claim1 = new Claim("1", "", "");
            Claim2 = new Claim("2", "", "");

            //generated item cards for more like this tests
            itemCards = itemCards.AddRange(MoreItemCards());
            var settings = new AppSettings()
            {
                SettingsConfig = new SettingsConfig()
                {
                    NumMoreLikeThisItems = 3
                }
            };

            Context = SampleItemsContext.Create(sampleItems: SampleItems, itemCards: itemCards, appSettings: settings);

            var loggerFactory = new Mock <ILoggerFactory>();
            var logger        = new Mock <ILogger>();

            loggerFactory.Setup(lf => lf.CreateLogger(It.IsAny <string>())).Returns(logger.Object);
            ItemViewRepo = new ItemViewRepo(Context, loggerFactory.Object);
        }