Skip to content

c3_Filtering_sequence - golden_middle test and solution is wrong #24

@martincnz

Description

@martincnz

In the solution:

/**
  * `number_service()` returns 300 numbers, but you only need 100 numbers, from the middle.
  */
 @Test
 public void golden_middle() {
     Flux<Integer> numbers = number_service()
             .skip(100) //this should be .skip(150) as 300/2 = 150
             .take(100)
             ;

     StepVerifier.create(numbers)
                 .expectNextMatches(i -> i >= 100) // this should be expectNextMatches(i -> i >= 100), as the middle number is 150
                 .expectNextCount(99)
                 .verifyComplete();
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions