Esempio n. 1
0
        public void TestSearchAccuracy8()
        {
            // arrange
            var criteria = new OperationalIncidentSearchCriteria
            {
            };

            // act
            SearchResult <OperationalIncident> result = instance.Search(criteria);

            // assert
            AssertResult(result);
        }
Esempio n. 2
0
        public void TestSearchAccuracy3()
        {
            // arrange
            var criteria = new OperationalIncidentSearchCriteria
            {
                ReportedToORMMonthId = 4,
                ReportedToORMYearId  = 4,
                RootCauseId          = 4
            };

            // act
            SearchResult <OperationalIncident> result = instance.Search(criteria);

            // assert
            AssertResult(result);
        }
Esempio n. 3
0
        public void TestSearchAccuracy2()
        {
            // arrange
            var criteria = new OperationalIncidentSearchCriteria
            {
                IncidentYearId     = 2,
                RemediationMonthId = 2,
                RemediationYearId  = 2
            };

            // act
            SearchResult <OperationalIncident> result = instance.Search(criteria);

            // assert
            AssertResult(result);
        }
Esempio n. 4
0
        public void TestSearchAccuracy1()
        {
            // arrange
            var criteria = new OperationalIncidentSearchCriteria
            {
                BusinessUnitId      = 1,
                FinancialExposureId = 1,
                IncidentMonthId     = 1
            };

            // act
            SearchResult <OperationalIncident> result = instance.Search(criteria);

            // assert
            AssertResult(result);
        }
Esempio n. 5
0
        public void TestSearchAccuracy7()
        {
            // arrange
            var criteria = new OperationalIncidentSearchCriteria
            {
                PageNumber = 2,
                PageSize   = 4,
                SortBy     = nameof(OperationalIncident.OperationalFinding),
                SortType   = SortType.Descending
            };

            // act
            SearchResult <OperationalIncident> result = instance.Search(criteria);

            // assert
            AssertResult(result);
        }
Esempio n. 6
0
        public void TestSearchAccuracy6()
        {
            // arrange
            var criteria = new OperationalIncidentSearchCriteria
            {
                ImpactIds = new List <long> {
                    1, 6, 7, 8, 9
                },
                OperationalFinding = "ding1",
                PageNumber         = 1,
                PageSize           = 3,
                SortBy             = nameof(OperationalIncident.IncidentNumber),
                SortType           = SortType.Ascending
            };

            // act
            SearchResult <OperationalIncident> result = instance.Search(criteria);

            // assert
            AssertResult(result);
        }
Esempio n. 7
0
        public void TestSearchAccuracy5()
        {
            // arrange
            var criteria = new OperationalIncidentSearchCriteria
            {
                CompletionTypes = new List <ScorecardCompletionType> {
                    ScorecardCompletionType.Completed
                },
                IncidentNumber = "O1601",
                PageNumber     = 1,
                PageSize       = 2,
                SortBy         = nameof(OperationalIncident.BusinessUnit) + ".Value",
                SortType       = SortType.Descending
            };

            // act
            SearchResult <OperationalIncident> result = instance.Search(criteria);

            // assert
            AssertResult(result);
        }
 public SearchResult <OperationalIncident> Search([FromUri] OperationalIncidentSearchCriteria criteria)
 {
     criteria = criteria ?? new OperationalIncidentSearchCriteria();
     return(OperationalIncidentService.Search(criteria));
 }