Package samples.system
Class SystemClassUser
- java.lang.Object
-
- samples.system.SystemClassUser
-
public class SystemClassUser extends java.lang.ObjectClass 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 voidcopyProperty(java.lang.String to, java.lang.String from)voiddoMoreComplicatedStuff()java.lang.ProcessexecuteCommand()java.lang.Stringformat(java.lang.String one, java.lang.String args)java.lang.StringgeneratePerishableToken()java.net.InetAddressgetLocalHost()java.lang.StringgetSystemProperty()private intlengthOf(java.lang.CharSequence to)intlengthOf(java.lang.StringBuilder to)java.lang.StringBuildernewStringBuilder()java.net.URLnewURL(java.lang.String anUrl)java.lang.StringperformEncode()voidshuffleCollection(java.util.List<?> list)voidthreadSleep()java.net.URLConnectionuseURL(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)
-
-