Beispiel #1
0
        public void WithPagination_Should_Set_Pagination(FakeParameters parameters, OrderParameter <string> order, PaginationParameter pagination)
        {
            // Arrange
            var builder = new TestedBuilder();

            // Act
            var result = builder.Begin()
                         .WithParameters(parameters)
                         .WithOrder(order)
                         .WithPagination(pagination)
                         .Build();

            // Assert
            Check.That(result.Parameters.HasValue)
            .IsTrue();
            Check.That(result.Parameters.Value)
            .IsEqualTo(parameters);

            Check.That(result.Order.HasValue)
            .IsTrue();
            Check.That(result.Order.Value)
            .IsEqualTo(order);

            Check.That(result.Pagination.HasValue)
            .IsTrue();
            Check.That(result.Pagination.Value)
            .IsEqualTo(pagination);
        }
Beispiel #2
0
        public void WithParameters_Should_Set_Parameters(FakeParameters parameters)
        {
            // Arrange
            var builder = new TestedBuilder();

            // Act
            var result = builder.Begin()
                         .WithParameters(parameters)
                         .Build();

            // Assert
            Check.That(result.Parameters.HasValue)
            .IsTrue();
            Check.That(result.Parameters.Value)
            .IsEqualTo(parameters);

            Check.That(result.Order.HasValue)
            .IsFalse();
            Check.That(result.Pagination.HasValue)
            .IsFalse();
        }