Package samples.system
Class SystemClassUser
- java.lang.Object
-
- samples.system.SystemClassUser
-
public class SystemClassUser extends Object
Class used to demonstrate PowerMock's ability to mock system classes.
-
-
Constructor Summary
Constructors Constructor Description SystemClassUser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyProperty(String to, String from)
void
doMoreComplicatedStuff()
Process
executeCommand()
String
format(String one, String args)
String
generatePerishableToken()
InetAddress
getLocalHost()
String
getSystemProperty()
int
lengthOf(StringBuilder to)
StringBuilder
newStringBuilder()
URL
newURL(String anUrl)
String
performEncode()
void
shuffleCollection(List<?> list)
void
threadSleep()
URLConnection
useURL(URL url)
-
-
-
Method Detail
-
threadSleep
public void threadSleep() throws InterruptedException
- Throws:
InterruptedException
-
performEncode
public String performEncode() throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
executeCommand
public Process executeCommand() throws IOException
- Throws:
IOException
-
getSystemProperty
public String getSystemProperty() throws IOException
- Throws:
IOException
-
doMoreComplicatedStuff
public void doMoreComplicatedStuff() throws IOException
- Throws:
IOException
-
copyProperty
public void copyProperty(String to, String from) throws IOException
- Throws:
IOException
-
format
public String format(String one, String args) throws IOException
- Throws:
IOException
-
newURL
public URL newURL(String anUrl) throws MalformedURLException
- Throws:
MalformedURLException
-
newStringBuilder
public StringBuilder newStringBuilder()
-
shuffleCollection
public void shuffleCollection(List<?> list)
-
useURL
public URLConnection useURL(URL url) throws IOException
- Throws:
IOException
-
getLocalHost
public InetAddress getLocalHost() throws IOException
- Throws:
IOException
-
generatePerishableToken
public String generatePerishableToken()
-
lengthOf
public int lengthOf(StringBuilder to)
-
-