mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 18:59:15 +00:00
* Fix comment typo #2325 * Minor enchancements to flyweight #2326 * Minor enchancements to flyweight #2326
This commit is contained in:
@@ -28,6 +28,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
@@ -55,8 +56,6 @@ class AlchemistShopTest {
|
||||
|
||||
// There are 13 potion instances, but only 5 unique instance types
|
||||
assertEquals(13, allPotions.size());
|
||||
assertEquals(5, allPotions.stream().map(System::identityHashCode).distinct().count());
|
||||
|
||||
assertEquals(5, new HashSet<>(allPotions).size());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user