Esempio n. 1
0
        public void TwoPagedsWithDifferentCountShouldNotBeEqual()
        {
            var r1 = Paged <int> .TryCreate(0, new List <int> {
                1
            }.ToImmutableList());

            var r2 = Paged <int> .TryCreate(1, new List <int> {
                1
            }.ToImmutableList());

            Helper.ShouldNotBeEqual(r1, r2);
        }
Esempio n. 2
0
        public void TwoPagedsWithSameValueShouldBeEqual()
        {
            var r1 = Paged <int> .TryCreate(0, new List <int> {
                1
            }.ToImmutableList());

            var r2 = Paged <int> .TryCreate(0, new List <int> {
                1
            }.ToImmutableList());

            Helper.ShouldBeEqual(r1, r2);
        }
Esempio n. 3
0
        public void NegativeValue_ShouldFail()
        {
            var result = Paged <int> .TryCreate(-1, new List <int>().ToImmutableList());

            result.IsFailure.ShouldBeTrue();
        }
Esempio n. 4
0
        public void NonNegativeValue_ShouldSucceed()
        {
            var result = Paged <int> .TryCreate(0, new List <int>().ToImmutableList());

            result.IsSuccess.ShouldBeTrue();
        }