From 836722cb0681cf930c6ed5883c94c28dd47fcd38 Mon Sep 17 00:00:00 2001 From: pivovarit Date: Tue, 5 Jun 2018 20:00:15 +0200 Subject: [PATCH] Rename test --- ... => SingletonSynchronizationIntegrationTest.java} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename patterns/design-patterns/src/test/java/com/baeldung/singleton/synchronization/{SingletonSynchronizationUnitTest.java => SingletonSynchronizationIntegrationTest.java} (94%) diff --git a/patterns/design-patterns/src/test/java/com/baeldung/singleton/synchronization/SingletonSynchronizationUnitTest.java b/patterns/design-patterns/src/test/java/com/baeldung/singleton/synchronization/SingletonSynchronizationIntegrationTest.java similarity index 94% rename from patterns/design-patterns/src/test/java/com/baeldung/singleton/synchronization/SingletonSynchronizationUnitTest.java rename to patterns/design-patterns/src/test/java/com/baeldung/singleton/synchronization/SingletonSynchronizationIntegrationTest.java index 08a70f6056..de3d31ed9f 100644 --- a/patterns/design-patterns/src/test/java/com/baeldung/singleton/synchronization/SingletonSynchronizationUnitTest.java +++ b/patterns/design-patterns/src/test/java/com/baeldung/singleton/synchronization/SingletonSynchronizationIntegrationTest.java @@ -15,7 +15,7 @@ import org.junit.Test; * @author Donato Rimenti * */ -public class SingletonSynchronizationUnitTest { +public class SingletonSynchronizationIntegrationTest { /** * Size of the thread pools used. @@ -33,7 +33,7 @@ public class SingletonSynchronizationUnitTest { @Test public void givenDraconianSingleton_whenMultithreadInstancesEquals_thenTrue() { ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE); - Set resultSet = Collections.synchronizedSet(new HashSet()); + Set resultSet = Collections.synchronizedSet(new HashSet<>()); // Submits the instantiation tasks. for (int i = 0; i < TASKS_TO_SUBMIT; i++) { @@ -51,7 +51,7 @@ public class SingletonSynchronizationUnitTest { @Test public void givenDclSingleton_whenMultithreadInstancesEquals_thenTrue() { ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE); - Set resultSet = Collections.synchronizedSet(new HashSet()); + Set resultSet = Collections.synchronizedSet(new HashSet<>()); // Submits the instantiation tasks. for (int i = 0; i < TASKS_TO_SUBMIT; i++) { @@ -69,7 +69,7 @@ public class SingletonSynchronizationUnitTest { @Test public void givenEarlyInitSingleton_whenMultithreadInstancesEquals_thenTrue() { ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE); - Set resultSet = Collections.synchronizedSet(new HashSet()); + Set resultSet = Collections.synchronizedSet(new HashSet<>()); // Submits the instantiation tasks. for (int i = 0; i < TASKS_TO_SUBMIT; i++) { @@ -87,7 +87,7 @@ public class SingletonSynchronizationUnitTest { @Test public void givenInitOnDemandSingleton_whenMultithreadInstancesEquals_thenTrue() { ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE); - Set resultSet = Collections.synchronizedSet(new HashSet()); + Set resultSet = Collections.synchronizedSet(new HashSet<>()); // Submits the instantiation tasks. for (int i = 0; i < TASKS_TO_SUBMIT; i++) { @@ -105,7 +105,7 @@ public class SingletonSynchronizationUnitTest { @Test public void givenEnumSingleton_whenMultithreadInstancesEquals_thenTrue() { ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE); - Set resultSet = Collections.synchronizedSet(new HashSet()); + Set resultSet = Collections.synchronizedSet(new HashSet<>()); // Submits the instantiation tasks. for (int i = 0; i < TASKS_TO_SUBMIT; i++) {