Esempio n. 1
0
        public void TestSearchAccuracy1()
        {
            // arrange
            var criteria = new AuditFindingSearchCriteria();

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

            // assert
            AssertResult(result);
        }
Esempio n. 2
0
        public void TestSearchAccuracy9()
        {
            // arrange
            var criteria = new AuditFindingSearchCriteria
            {
                SortBy   = nameof(AuditFinding.AuditTitle),
                SortType = SortType.Ascending
            };

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

            // assert
            AssertResult(result);
        }
Esempio n. 3
0
        public void TestSearchAccuracy7()
        {
            // arrange
            var criteria = new AuditFindingSearchCriteria
            {
                RootCauseId = 4,
                SourceId    = 4,
                StatusId    = 4
            };

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

            // assert
            AssertResult(result);
        }
Esempio n. 4
0
        public void TestSearchAccuracy3()
        {
            // arrange
            var criteria = new AuditFindingSearchCriteria
            {
                AuditMonthId   = 4,
                AuditYearId    = 4,
                BusinessUnitId = 4,
            };

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

            // assert
            AssertResult(result);
        }
Esempio n. 5
0
        public void TestSearchAccuracy8()
        {
            // arrange
            var criteria = new AuditFindingSearchCriteria
            {
                PageNumber = 2,
                PageSize   = 3,
                SortBy     = nameof(AuditFinding.AuditFindingNumber),
                SortType   = SortType.Descending
            };

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

            // assert
            AssertResult(result);
        }
Esempio n. 6
0
        public void TestSearchAccuracy6()
        {
            // arrange
            var criteria = new AuditFindingSearchCriteria
            {
                RemediationMonthId   = 7,
                RemediationYearId    = 7,
                ReportedToORMMonthId = 7,
                ReportedToORMYearId  = 7
            };

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

            // assert
            AssertResult(result);
        }
Esempio n. 7
0
        public void TestSearchAccuracy4()
        {
            // arrange
            var criteria = new AuditFindingSearchCriteria
            {
                AuditTitle = "Titil",
                PageNumber = 1,
                PageSize   = 2,
                SortBy     = nameof(AuditFinding.AuditMonth) + ".Id",
                SortType   = SortType.Descending
            };

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

            // assert
            AssertResult(result);
        }
Esempio n. 8
0
        public void TestSearchAccuracy5()
        {
            // arrange
            var criteria = new AuditFindingSearchCriteria
            {
                CompletionTypes = new List <ScorecardCompletionType> {
                    ScorecardCompletionType.Draft
                },
                ImpactIds = new List <long> {
                    5, 8, 3
                },
                PageNumber = 1,
                PageSize   = 2,
                SortBy     = nameof(AuditFinding.CompletionType),
                SortType   = SortType.Ascending
            };

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

            // assert
            AssertResult(result);
        }
Esempio n. 9
0
 public SearchResult<AuditFinding> Search([FromUri]AuditFindingSearchCriteria criteria)
 {
     criteria = criteria ?? new AuditFindingSearchCriteria();
     return AuditFindingService.Search(criteria);
 }