Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo n.º 3
0
        public void NegativeValue_ShouldFail()
        {
            var result = Paged <int> .TryCreate(-1, new List <int>().ToImmutableList());

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

            result.IsSuccess.ShouldBeTrue();
        }