Removed Trailing whiespaces and corrected the indentation

This commit is contained in:
Somnath Musib 2022-04-23 14:35:49 +05:30
parent a811cb32cf
commit 5e1fdd53f0
1 changed files with 5 additions and 10 deletions

View File

@ -17,11 +17,10 @@ public class CharacterUnitTest {
Flux<Character> characterFlux = characterGenerator.generateCharacters().take(3); Flux<Character> characterFlux = characterGenerator.generateCharacters().take(3);
StepVerifier.create(characterFlux) StepVerifier.create(characterFlux)
.expectNext('a', 'b', 'c') .expectNext('a', 'b', 'c')
.expectComplete() .expectComplete()
.verify(); .verify();
} }
@Test @Test
public void whenCreatingCharactersWithMultipleThreads_thenSequenceIsProducedAsynchronously() throws InterruptedException { public void whenCreatingCharactersWithMultipleThreads_thenSequenceIsProducedAsynchronously() throws InterruptedException {
CharacterGenerator characterGenerator = new CharacterGenerator(); CharacterGenerator characterGenerator = new CharacterGenerator();
@ -35,14 +34,10 @@ public class CharacterUnitTest {
.block(); .block();
CharacterCreator characterCreator = new CharacterCreator(); CharacterCreator characterCreator = new CharacterCreator();
Thread producerThread1 = new Thread( Thread producerThread1 = new Thread(
() -> characterCreator.consumer.accept(sequence1) () -> characterCreator.consumer.accept(sequence1));
);
Thread producerThread2 = new Thread( Thread producerThread2 = new Thread(
() -> characterCreator.consumer.accept(sequence2) () -> characterCreator.consumer.accept(sequence2));
);
List<Character> consolidated = new ArrayList<>(); List<Character> consolidated = new ArrayList<>();
characterCreator.createCharacterSequence().subscribe(consolidated::add); characterCreator.createCharacterSequence().subscribe(consolidated::add);