public class MockSystemReader extends SystemReader
SystemReader for tests.| Constructor and Description |
|---|
MockSystemReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearProperties() |
long |
getCurrentTime() |
DateFormat |
getDateTimeInstance(int dateStyle,
int timeStyle) |
String |
getenv(String variable) |
String |
getHostname() |
Locale |
getLocale() |
String |
getProperty(String key) |
SimpleDateFormat |
getSimpleDateFormat(String pattern) |
TimeZone |
getTimeZone() |
int |
getTimezone(long when) |
FileBasedConfig |
openSystemConfig(Config parent,
FS fs) |
FileBasedConfig |
openUserConfig(Config parent,
FS fs) |
void |
setCurrentPlatform()
Assign some properties for the currently executing platform
|
void |
setProperty(String key,
String value) |
void |
setUnix()
Emulate Unix
|
void |
setWindows()
Emulate Windows
|
void |
tick(int secDelta)
Adjusts the current time in seconds.
|
checkPath, checkPath, getInstance, getSimpleDateFormat, isMacOS, isWindows, setInstance, setPlatformCheckerpublic void clearProperties()
public String getenv(String variable)
getenv in class SystemReaderpublic String getProperty(String key)
getProperty in class SystemReaderpublic FileBasedConfig openUserConfig(Config parent, FS fs)
openUserConfig in class SystemReaderpublic FileBasedConfig openSystemConfig(Config parent, FS fs)
openSystemConfig in class SystemReaderpublic String getHostname()
getHostname in class SystemReaderpublic long getCurrentTime()
getCurrentTime in class SystemReaderpublic void tick(int secDelta)
secDelta - number of seconds to add to the current time.public int getTimezone(long when)
getTimezone in class SystemReaderpublic TimeZone getTimeZone()
getTimeZone in class SystemReaderpublic Locale getLocale()
getLocale in class SystemReaderpublic SimpleDateFormat getSimpleDateFormat(String pattern)
getSimpleDateFormat in class SystemReaderpublic DateFormat getDateTimeInstance(int dateStyle, int timeStyle)
getDateTimeInstance in class SystemReaderpublic void setCurrentPlatform()
public void setWindows()
public void setUnix()
Copyright © 2016 Eclipse JGit Project. All rights reserved.