Exemplo n.º 1
0
        public void AppendSort__Given_MultiSort__When_Multiple__Then_BuildCsv
            (string sortA, string sortB, string sortC)
        {
            var subject = new QueryContext <BasicModel>();

            subject.AppendSort(sortA);
            subject.AppendSort(sortB);
            subject.AppendSort(sortC);

            var result = subject.Sort;

            Assert.Equal($"{sortA},{sortB},{sortC}", result);
        }
Exemplo n.º 2
0
        public void AppendSort__Given_Sort__Then_BuildCsv
            (string sort)
        {
            var subject = new QueryContext <BasicModel>();

            subject.AppendSort(sort);

            var result = subject.Sort;

            Assert.Equal(sort, result);
        }
Exemplo n.º 3
0
        public void AppendSort__Given_NullOrWhitespaceSort__Then_Return
            (string sort)
        {
            var subject = new QueryContext <BasicModel>();

            subject.AppendSort(sort);

            var result = subject.Sort;

            Assert.NotNull(result);
            Assert.Empty(result);
        }