From 2dca13f521abc1328c932e5df32c20e9eb167e86 Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Fri, 12 Jan 2018 01:25:03 +0100 Subject: Successful test for the BoardConverter(finally...) --- src/test/java/fr/umlv/java/wallj/board/BoardConverterTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/test/java/fr') diff --git a/src/test/java/fr/umlv/java/wallj/board/BoardConverterTest.java b/src/test/java/fr/umlv/java/wallj/board/BoardConverterTest.java index ad96ea1..020938e 100644 --- a/src/test/java/fr/umlv/java/wallj/board/BoardConverterTest.java +++ b/src/test/java/fr/umlv/java/wallj/board/BoardConverterTest.java @@ -8,6 +8,8 @@ import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; /** * @author Adam NAILI @@ -66,8 +68,9 @@ final class BoardConverterTest { certifiedBlocks.add(BlockFactory.build(BlockType.TRASH,t4)); List blocks = BoardConverter.boardToWorld(board); + List blockTypes = blocks.stream().map(Block::getType).collect(Collectors.toList()); + List blockTypesCertified= certifiedBlocks.stream().map(Block::getType).collect(Collectors.toList()); + Assertions.assertEquals(blockTypesCertified,blockTypes); } - - } -- cgit v1.2.3