public TestMultipleSearch1Field()
        {
            //Create 4 phase entries by public
            PhaseHelper.CreatePhaseWithGenerateSystemDateTimeField();

            //Create 5 phase entries more by private. Make sure that we have multiple phase entry to search correctly
            recordUpdater1 = new HrbcRecordUpdater(() => PhaseHelper.InitRecordsUpdater(records, defaultResource, indexHrbcRecord, 1)); //Update phase in middle. Note: should choose resource type more than 3 option phases
            recordUpdater2 = new HrbcRecordUpdater(() => PhaseHelper.InitRecordsUpdater(records, defaultResource, indexHrbcRecord, 2));
            recordUpdater3 = new HrbcRecordUpdater(() => PhaseHelper.InitRecordsUpdater(records, defaultResource, indexHrbcRecord, 3));
        }
예제 #2
0
        public TestSingleSearchField()
        {
            conditionValues = new Dictionary <string, object>()
            {
                [nameof(PhaseApiFields.Resource)] = ((int)defaultResource).ToString(),
                [PhaseApiFields.Phase]            = OptionFieldHelper.GetOptionItem(OptionFieldHelper.GetOptionList($"Option.P_{defaultResource.ToResourceName()}Phase").First()).Id,
                [PhaseApiFields.Date]             = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                [PhaseApiFields.Memo]             = "Memo",
                [PhaseApiFields.Recent]           = "1",
                [PhaseApiFields.RegisteredBy]     = "1",
                [PhaseApiFields.UpdatedBy]        = "1",
                [PhaseApiFields.UpdateDate]       = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                [PhaseApiFields.RegistrationDate] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
            };

            //Create 4 phase entries more
            PhaseHelper.CreatePhaseWithGenerateSystemDateTimeField();

            //Create 3 phase entries more by private. Make sure that we have multiple phase entry to search correctly
            recordUpdater1 = new HrbcRecordUpdater(() => PhaseHelper.InitRecordsUpdater(records, defaultResource, num, 1)); //Update phase in middle. Note: should choose resource type more than 3 option phases
            recordUpdater2 = new HrbcRecordUpdater(() => PhaseHelper.InitRecordsUpdater(records, defaultResource, num, 2));
            recordUpdater3 = new HrbcRecordUpdater(() => PhaseHelper.InitRecordsUpdater(records, defaultResource, num, 3));
        }