Package samples.system
Class SystemClassUser
- java.lang.Object
-
- samples.system.SystemClassUser
-
public class SystemClassUser extends java.lang.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(java.lang.String to, java.lang.String from)
void
doMoreComplicatedStuff()
java.lang.Process
executeCommand()
java.lang.String
format(java.lang.String one, java.lang.String args)
java.lang.String
generatePerishableToken()
java.net.InetAddress
getLocalHost()
java.lang.String
getSystemProperty()
private int
lengthOf(java.lang.CharSequence to)
int
lengthOf(java.lang.StringBuilder to)
java.lang.StringBuilder
newStringBuilder()
java.net.URL
newURL(java.lang.String anUrl)
java.lang.String
performEncode()
void
shuffleCollection(java.util.List<?> list)
void
threadSleep()
java.net.URLConnection
useURL(java.net.URL url)
-
-
-
Method Detail
-
threadSleep
public void threadSleep() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
performEncode
public java.lang.String performEncode() throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
-
executeCommand
public java.lang.Process executeCommand() throws java.io.IOException
- Throws:
java.io.IOException
-
getSystemProperty
public java.lang.String getSystemProperty() throws java.io.IOException
- Throws:
java.io.IOException
-
doMoreComplicatedStuff
public void doMoreComplicatedStuff() throws java.io.IOException
- Throws:
java.io.IOException
-
copyProperty
public void copyProperty(java.lang.String to, java.lang.String from) throws java.io.IOException
- Throws:
java.io.IOException
-
format
public java.lang.String format(java.lang.String one, java.lang.String args) throws java.io.IOException
- Throws:
java.io.IOException
-
newURL
public java.net.URL newURL(java.lang.String anUrl) throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
newStringBuilder
public java.lang.StringBuilder newStringBuilder()
-
shuffleCollection
public void shuffleCollection(java.util.List<?> list)
-
useURL
public java.net.URLConnection useURL(java.net.URL url) throws java.io.IOException
- Throws:
java.io.IOException
-
getLocalHost
public java.net.InetAddress getLocalHost() throws java.io.IOException
- Throws:
java.io.IOException
-
generatePerishableToken
public java.lang.String generatePerishableToken()
-
lengthOf
public int lengthOf(java.lang.StringBuilder to)
-
lengthOf
private int lengthOf(java.lang.CharSequence to)
-
-