Fixed comments

This commit is contained in:
ramkumarvenkat 2020-03-12 07:35:47 +05:30
parent 9860318a48
commit 79433c0396
1 changed files with 17 additions and 32 deletions

View File

@ -1,50 +1,35 @@
package com.baeldung.guava.mapmaker;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
import com.google.common.collect.MapMaker;
import org.junit.Test;
import java.util.concurrent.ConcurrentMap;
import static org.junit.Assert.assertNotNull;
public class GuavaMapMakerUnitTest {
@Test
public void whenMakeMap_thenCreated() {
ConcurrentMap<String, String> m = new MapMaker()
.makeMap();
assertNotNull(m);
@Test public void whenMakeMap_thenCreated() {
ConcurrentMap<String, String> concurrentMap = new MapMaker().makeMap();
assertNotNull(concurrentMap);
}
@Test
public void whenMakeMapWithWeakKeys_thenCreated() {
ConcurrentMap<String, String> m = new MapMaker()
.weakKeys()
.makeMap();
assertNotNull(m);
@Test public void whenMakeMapWithWeakKeys_thenCreated() {
ConcurrentMap<String, String> concurrentMap = new MapMaker().weakKeys().makeMap();
assertNotNull(concurrentMap);
}
@Test
public void whenMakeMapWithWeakValues_thenCreated() {
ConcurrentMap<String, String> m = new MapMaker()
.weakValues()
.makeMap();
assertNotNull(m);
@Test public void whenMakeMapWithWeakValues_thenCreated() {
ConcurrentMap<String, String> concurrentMap = new MapMaker().weakValues().makeMap();
assertNotNull(concurrentMap);
}
@Test
public void whenMakeMapWithInitialCapacity_thenCreated() {
ConcurrentMap<String, String> m = new MapMaker()
.initialCapacity(10)
.makeMap();
assertNotNull(m);
@Test public void whenMakeMapWithInitialCapacity_thenCreated() {
ConcurrentMap<String, String> concurrentMap = new MapMaker().initialCapacity(10).makeMap();
assertNotNull(concurrentMap);
}
@Test
public void whenMakeMapWithConcurrencyLevel_thenCreated() {
ConcurrentMap<String, String> m = new MapMaker()
.concurrencyLevel(10)
.makeMap();
assertNotNull(m);
@Test public void whenMakeMapWithConcurrencyLevel_thenCreated() {
ConcurrentMap<String, String> concurrentMap = new MapMaker().concurrencyLevel(10).makeMap();
assertNotNull(concurrentMap);
}
}