Fixed comments
This commit is contained in:
parent
9860318a48
commit
79433c0396
@ -1,50 +1,35 @@
|
|||||||
package com.baeldung.guava.mapmaker;
|
package com.baeldung.guava.mapmaker;
|
||||||
|
|
||||||
import static org.junit.Assert.assertNotNull;
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
|
|
||||||
import com.google.common.collect.MapMaker;
|
import com.google.common.collect.MapMaker;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
|
||||||
public class GuavaMapMakerUnitTest {
|
public class GuavaMapMakerUnitTest {
|
||||||
@Test
|
@Test public void whenMakeMap_thenCreated() {
|
||||||
public void whenMakeMap_thenCreated() {
|
ConcurrentMap<String, String> concurrentMap = new MapMaker().makeMap();
|
||||||
ConcurrentMap<String, String> m = new MapMaker()
|
assertNotNull(concurrentMap);
|
||||||
.makeMap();
|
|
||||||
assertNotNull(m);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test public void whenMakeMapWithWeakKeys_thenCreated() {
|
||||||
public void whenMakeMapWithWeakKeys_thenCreated() {
|
ConcurrentMap<String, String> concurrentMap = new MapMaker().weakKeys().makeMap();
|
||||||
ConcurrentMap<String, String> m = new MapMaker()
|
assertNotNull(concurrentMap);
|
||||||
.weakKeys()
|
|
||||||
.makeMap();
|
|
||||||
assertNotNull(m);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test public void whenMakeMapWithWeakValues_thenCreated() {
|
||||||
public void whenMakeMapWithWeakValues_thenCreated() {
|
ConcurrentMap<String, String> concurrentMap = new MapMaker().weakValues().makeMap();
|
||||||
ConcurrentMap<String, String> m = new MapMaker()
|
assertNotNull(concurrentMap);
|
||||||
.weakValues()
|
|
||||||
.makeMap();
|
|
||||||
assertNotNull(m);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test public void whenMakeMapWithInitialCapacity_thenCreated() {
|
||||||
public void whenMakeMapWithInitialCapacity_thenCreated() {
|
ConcurrentMap<String, String> concurrentMap = new MapMaker().initialCapacity(10).makeMap();
|
||||||
ConcurrentMap<String, String> m = new MapMaker()
|
assertNotNull(concurrentMap);
|
||||||
.initialCapacity(10)
|
|
||||||
.makeMap();
|
|
||||||
assertNotNull(m);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test public void whenMakeMapWithConcurrencyLevel_thenCreated() {
|
||||||
public void whenMakeMapWithConcurrencyLevel_thenCreated() {
|
ConcurrentMap<String, String> concurrentMap = new MapMaker().concurrencyLevel(10).makeMap();
|
||||||
ConcurrentMap<String, String> m = new MapMaker()
|
assertNotNull(concurrentMap);
|
||||||
.concurrencyLevel(10)
|
|
||||||
.makeMap();
|
|
||||||
assertNotNull(m);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user