public class ExpectNewDemo
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
dummyField |
| Constructor and Description |
|---|
ExpectNewDemo() |
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
alternativePath() |
boolean |
equals(java.lang.Object obj) |
boolean |
fileExists(java.lang.String name) |
void |
fileWriter(java.lang.String name,
java.lang.String msg) |
void |
fileWriterPrint(java.lang.String name,
java.lang.String msg) |
java.lang.String |
getMessage() |
java.lang.String |
getMessageWithArgument() |
int |
hashCode() |
void |
invokeVoidMethod() |
java.util.Date |
makeDate() |
java.lang.String |
multipleNew() |
byte[][] |
newVarArgs(byte[]... bytes) |
int[] |
newVarArgs(float myFloat,
int... ints) |
Service[] |
newVarArgs(Service... services) |
java.lang.String[] |
newVarArgs(java.lang.String... strings) |
byte[][] |
newVarArgsWithMatchers() |
java.lang.String |
newWithArguments(Service service,
int times) |
java.lang.String |
newWithWrongArguments(Service service,
int times) |
void |
simpleMultipleNew() |
private void |
simpleMultipleNewPrivate() |
void |
simpleSingleNew() |
void |
throwExceptionAndWrapInRunTimeWhenInvoction()
The purpose of the method is to demonstrate that a test case can mock the
new instance call and throw an exception upon instantiation.
|
void |
throwExceptionWhenInvoction()
The purpose of the method is to demonstrate that a test case can mock the
new instance call and throw an exception upon instantiation.
|
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String getMessage()
public java.lang.String getMessageWithArgument()
public void invokeVoidMethod()
public void throwExceptionWhenInvoction()
public void throwExceptionAndWrapInRunTimeWhenInvoction()
public java.lang.String multipleNew()
public void simpleMultipleNew()
private void simpleMultipleNewPrivate()
public void simpleSingleNew()
public java.util.Date makeDate()
public boolean fileExists(java.lang.String name)
public java.io.InputStream alternativePath()
public java.lang.String newWithArguments(Service service, int times)
public java.lang.String newWithWrongArguments(Service service, int times)
public java.lang.String[] newVarArgs(java.lang.String... strings)
public int[] newVarArgs(float myFloat,
int... ints)
public byte[][] newVarArgs(byte[]... bytes)
public byte[][] newVarArgsWithMatchers()
public void fileWriter(java.lang.String name,
java.lang.String msg)
throws java.io.IOException
java.io.IOExceptionpublic void fileWriterPrint(java.lang.String name,
java.lang.String msg)
throws java.io.IOException
java.io.IOException