Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added new automatic tests for Singular
- Loading branch information
Michail Plushnikov
committed
Jun 11, 2016
1 parent
62fa200
commit 2c5affd
Showing
36 changed files
with
3,364 additions
and
40 deletions.
There are no files selected for viewing
86 changes: 86 additions & 0 deletions
86
src/test/java/de/plushnikov/intellij/plugin/processor/BuilderSingularTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,86 @@ | |||
package de.plushnikov.intellij.plugin.processor; | |||
|
|||
import de.plushnikov.intellij.plugin.AbstractLombokParsingTestCase; | |||
|
|||
import java.io.IOException; | |||
|
|||
/** | |||
* Unit tests for IntelliJPlugin for Lombok, based on lombok test classes | |||
*/ | |||
public class BuilderSingularTest extends AbstractLombokParsingTestCase { | |||
@Override | |||
public void setUp() throws Exception { | |||
super.setUp(); | |||
// Add dummy classes, which are absent in mockJDK | |||
myFixture.addClass("package java.util;\n public interface NavigableMap<K,V> extends java.util.SortedMap<K,V> {}"); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Guava$SingularGuavaBiMap() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Guava$SingularGuavaCollection() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Guava$SingularGuavaList() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Guava$SingularGuavaMap() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Guava$SingularGuavaSet() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Guava$SingularGuavaSortedMap() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Guava$SingularGuavaSortedSet() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Guava$SingularGuavaTable() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
|
|||
public void testBuilder$Singular$Generic$Util$Collection$SingularCollection() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Util$Collection$SingularIterable() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Util$Collection$SingularList() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Util$Collection$SingularNavigableSet() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Util$Collection$SingularSet() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Util$Collection$SingularSortedSet() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Util$Map$SingularMap() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Util$Map$SingularNavigableMap() throws IOException { | |||
doTest(true); | |||
} | |||
|
|||
public void testBuilder$Singular$Generic$Util$Map$SingularSortedMap() throws IOException { | |||
doTest(true); | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
160 changes: 160 additions & 0 deletions
160
testData/after/builder/singular/generic/guava/SingularGuavaBiMap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,160 @@ | |||
// Generated by delombok at Sat Jun 11 10:40:08 CEST 2016 | |||
|
|||
import com.google.common.collect.ImmutableBiMap; | |||
|
|||
public class SingularGuavaBiMap<A, B> { | |||
private ImmutableBiMap rawTypes; | |||
private ImmutableBiMap<Integer, Float> integers; | |||
private ImmutableBiMap<A, B> generics; | |||
private ImmutableBiMap<? extends Number, ? extends String> extendsGenerics; | |||
|
|||
public static void main(String[] args) { | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
SingularGuavaBiMap(final ImmutableBiMap rawTypes, final ImmutableBiMap<Integer, Float> integers, final ImmutableBiMap<A, B> generics, final ImmutableBiMap<? extends Number, ? extends String> extendsGenerics) { | |||
this.rawTypes = rawTypes; | |||
this.integers = integers; | |||
this.generics = generics; | |||
this.extendsGenerics = extendsGenerics; | |||
} | |||
|
|||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public static class SingularGuavaBiMapBuilder<A, B> { | |||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
private com.google.common.collect.ImmutableBiMap.Builder<java.lang.Object, java.lang.Object> rawTypes; | |||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
private com.google.common.collect.ImmutableBiMap.Builder<Integer, Float> integers; | |||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
private com.google.common.collect.ImmutableBiMap.Builder<A, B> generics; | |||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
private com.google.common.collect.ImmutableBiMap.Builder<Number, String> extendsGenerics; | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
SingularGuavaBiMapBuilder() { | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> rawType(final java.lang.Object key, final java.lang.Object value) { | |||
if (this.rawTypes == null) this.rawTypes = com.google.common.collect.ImmutableBiMap.builder(); | |||
this.rawTypes.put(key, value); | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> rawTypes(final java.util.Map<?, ?> rawTypes) { | |||
if (this.rawTypes == null) this.rawTypes = com.google.common.collect.ImmutableBiMap.builder(); | |||
this.rawTypes.putAll(rawTypes); | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> clearRawTypes() { | |||
this.rawTypes = null; | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> integer(final Integer key, final Float value) { | |||
if (this.integers == null) this.integers = com.google.common.collect.ImmutableBiMap.builder(); | |||
this.integers.put(key, value); | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> integers(final java.util.Map<? extends Integer, ? extends Float> integers) { | |||
if (this.integers == null) this.integers = com.google.common.collect.ImmutableBiMap.builder(); | |||
this.integers.putAll(integers); | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> clearIntegers() { | |||
this.integers = null; | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> generic(final A key, final B value) { | |||
if (this.generics == null) this.generics = com.google.common.collect.ImmutableBiMap.builder(); | |||
this.generics.put(key, value); | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> generics(final java.util.Map<? extends A, ? extends B> generics) { | |||
if (this.generics == null) this.generics = com.google.common.collect.ImmutableBiMap.builder(); | |||
this.generics.putAll(generics); | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> clearGenerics() { | |||
this.generics = null; | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> extendsGeneric(final Number key, final String value) { | |||
if (this.extendsGenerics == null) this.extendsGenerics = com.google.common.collect.ImmutableBiMap.builder(); | |||
this.extendsGenerics.put(key, value); | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> extendsGenerics(final java.util.Map<? extends Number, ? extends String> extendsGenerics) { | |||
if (this.extendsGenerics == null) this.extendsGenerics = com.google.common.collect.ImmutableBiMap.builder(); | |||
this.extendsGenerics.putAll(extendsGenerics); | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMapBuilder<A, B> clearExtendsGenerics() { | |||
this.extendsGenerics = null; | |||
return this; | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public SingularGuavaBiMap<A, B> build() { | |||
com.google.common.collect.ImmutableBiMap<java.lang.Object, java.lang.Object> rawTypes = this.rawTypes == null ? com.google.common.collect.ImmutableBiMap.<java.lang.Object, java.lang.Object>of() : this.rawTypes.build(); | |||
com.google.common.collect.ImmutableBiMap<Integer, Float> integers = this.integers == null ? com.google.common.collect.ImmutableBiMap.<Integer, Float>of() : this.integers.build(); | |||
com.google.common.collect.ImmutableBiMap<A, B> generics = this.generics == null ? com.google.common.collect.ImmutableBiMap.<A, B>of() : this.generics.build(); | |||
com.google.common.collect.ImmutableBiMap<Number, String> extendsGenerics = this.extendsGenerics == null ? com.google.common.collect.ImmutableBiMap.<Number, String>of() : this.extendsGenerics.build(); | |||
return new SingularGuavaBiMap<A, B>(rawTypes, integers, generics, extendsGenerics); | |||
} | |||
|
|||
@java.lang.Override | |||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public java.lang.String toString() { | |||
return "SingularGuavaBiMap.SingularGuavaBiMapBuilder(rawTypes=" + this.rawTypes + ", integers=" + this.integers + ", generics=" + this.generics + ", extendsGenerics=" + this.extendsGenerics + ")"; | |||
} | |||
} | |||
|
|||
@java.lang.SuppressWarnings("all") | |||
@javax.annotation.Generated("lombok") | |||
public static <A, B> SingularGuavaBiMapBuilder<A, B> builder() { | |||
return new SingularGuavaBiMapBuilder<A, B>(); | |||
} | |||
} |
Oops, something went wrong.