public class ExpectNewDemo extends Object
Constructor and Description |
---|
ExpectNewDemo() |
Modifier and Type | Method and Description |
---|---|
InputStream |
alternativePath() |
Target |
createTarget(ITarget target) |
boolean |
equals(Object obj) |
boolean |
fileExists(String name) |
void |
fileWriter(String name,
String msg) |
void |
fileWriterPrint(String name,
String msg) |
String |
getMessage() |
String |
getMessageWithArgument() |
int |
hashCode() |
void |
invokeVoidMethod() |
Date |
makeDate() |
String |
multipleNew() |
byte[][] |
newSimpleVarArgs(byte[]... bytes) |
byte[][] |
newVarArgs(byte[]... bytes) |
int[] |
newVarArgs(float myFloat,
int... ints) |
Service[] |
newVarArgs(Service... services) |
String[] |
newVarArgs(String... strings) |
byte[][] |
newVarArgsWithMatchers() |
String |
newWithArguments(Service service,
int times) |
String |
newWithWrongArguments(Service service,
int times) |
void |
simpleMultipleNew() |
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 String getMessage()
public String getMessageWithArgument()
public void invokeVoidMethod()
public void throwExceptionWhenInvoction()
public void throwExceptionAndWrapInRunTimeWhenInvoction()
public String multipleNew()
public void simpleMultipleNew()
public void simpleSingleNew()
public Date makeDate()
public boolean fileExists(String name)
public InputStream alternativePath()
public int[] newVarArgs(float myFloat, int... ints)
public byte[][] newVarArgs(byte[]... bytes)
public byte[][] newVarArgsWithMatchers()
public void fileWriter(String name, String msg) throws IOException
IOException
public void fileWriterPrint(String name, String msg) throws IOException
IOException
public byte[][] newSimpleVarArgs(byte[]... bytes)
Copyright © 2019. All rights reserved.