-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for aRandomInstanceOf for interfaces and abstract
- Loading branch information
Showing
2 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
src/test/java/org/exparity/stub/testutils/type/AbstractOfAllTypes.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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package org.exparity.stub.testutils.type; | ||
|
||
import java.math.BigDecimal; | ||
import java.time.Instant; | ||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
import java.time.LocalTime; | ||
import java.time.ZonedDateTime; | ||
import java.util.Collection; | ||
import java.util.Date; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
public abstract class AbstractOfAllTypes { | ||
|
||
public static enum EnumValues { | ||
VALUE_1, VALUE_2 | ||
}; | ||
|
||
public abstract AbstractOfAllTypes.EnumValues getEnumValue(); | ||
|
||
public abstract boolean isBooleanValue(); | ||
|
||
public abstract Boolean getBooleanObjectValue(); | ||
|
||
public abstract String getStringValue(); | ||
|
||
public abstract Integer getIntegerObjectValue(); | ||
|
||
public abstract int getIntegerValue(); | ||
|
||
public abstract Long getLongObjectValue(); | ||
|
||
public abstract long getLongValue(); | ||
|
||
public abstract Short getShortObjectValue(); | ||
|
||
public abstract short getShortValue(); | ||
|
||
public abstract Double getDoubleObjectValue(); | ||
|
||
public abstract double getDoubleValue(); | ||
|
||
public abstract Float getFloatObjectValue(); | ||
|
||
public abstract float getFloatValue(); | ||
|
||
public abstract Character getCharObjectValue(); | ||
|
||
public abstract char getCharValue(); | ||
|
||
public abstract Byte getByteObjectValue(); | ||
|
||
public abstract byte getByteValue(); | ||
|
||
public abstract Date getDateValue(); | ||
|
||
public abstract LocalDate getLocalDateValue(); | ||
|
||
public abstract LocalTime getLocalTimeValue(); | ||
|
||
public abstract LocalDateTime getLocalDateTimeValue(); | ||
|
||
public abstract ZonedDateTime getZonedlDateTimeValue(); | ||
|
||
public abstract Instant getInstantValue(); | ||
|
||
public abstract BigDecimal getBigDecimalValue(); | ||
|
||
public abstract int[] getArray(); | ||
|
||
public abstract Collection<String> getCollection(); | ||
|
||
public abstract List<String> getList(); | ||
|
||
public abstract Set<String> getSet(); | ||
|
||
public abstract Map<Long, String> getMap(); | ||
|
||
public abstract Map<String, String[]> getArrayMap(); | ||
|
||
public abstract String[] getStringArray(); | ||
} |
84 changes: 84 additions & 0 deletions
84
src/test/java/org/exparity/stub/testutils/type/InterfaceOfAllTypes.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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package org.exparity.stub.testutils.type; | ||
|
||
import java.math.BigDecimal; | ||
import java.time.Instant; | ||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
import java.time.LocalTime; | ||
import java.time.ZonedDateTime; | ||
import java.util.Collection; | ||
import java.util.Date; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
public interface InterfaceOfAllTypes { | ||
|
||
public static enum EnumValues { | ||
VALUE_1, VALUE_2 | ||
}; | ||
|
||
public InterfaceOfAllTypes.EnumValues getEnumValue(); | ||
|
||
public boolean isBooleanValue(); | ||
|
||
public Boolean getBooleanObjectValue(); | ||
|
||
public String getStringValue(); | ||
|
||
public Integer getIntegerObjectValue(); | ||
|
||
public int getIntegerValue(); | ||
|
||
public Long getLongObjectValue(); | ||
|
||
public long getLongValue(); | ||
|
||
public Short getShortObjectValue(); | ||
|
||
public short getShortValue(); | ||
|
||
public Double getDoubleObjectValue(); | ||
|
||
public double getDoubleValue(); | ||
|
||
public Float getFloatObjectValue(); | ||
|
||
public float getFloatValue(); | ||
|
||
public Character getCharObjectValue(); | ||
|
||
public char getCharValue(); | ||
|
||
public Byte getByteObjectValue(); | ||
|
||
public byte getByteValue(); | ||
|
||
public Date getDateValue(); | ||
|
||
public LocalDate getLocalDateValue(); | ||
|
||
public LocalTime getLocalTimeValue(); | ||
|
||
public LocalDateTime getLocalDateTimeValue(); | ||
|
||
public ZonedDateTime getZonedlDateTimeValue(); | ||
|
||
public Instant getInstantValue(); | ||
|
||
public BigDecimal getBigDecimalValue(); | ||
|
||
public int[] getArray(); | ||
|
||
public Collection<String> getCollection(); | ||
|
||
public List<String> getList(); | ||
|
||
public Set<String> getSet(); | ||
|
||
public Map<Long, String> getMap(); | ||
|
||
public Map<String, String[]> getArrayMap(); | ||
|
||
public String[] getStringArray(); | ||
} |