public class MockSystemReader extends SystemReader
SystemReader for tests.| Constructor and Description |
|---|
MockSystemReader()
Constructor for
MockSystemReader |
checkPath, checkPath, getInstance, getSimpleDateFormat, isMacOS, isWindows, setInstance, setPlatformCheckerpublic FileBasedConfig setUserGitConfig(FileBasedConfig userGitConfig)
userGitConfig - set another user-level git configpublic void setJGitConfig(FileBasedConfig jgitConfig)
jgitConfig - set the jgit configurationpublic FileBasedConfig setSystemGitConfig(FileBasedConfig systemGitConfig)
systemGitConfig - the new system-level git configpublic void clearProperties()
public void setProperty(String key, String value)
key - value - 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 StoredConfig getUserConfig() throws IOException, ConfigInvalidException
getUserConfig in class SystemReaderIOExceptionConfigInvalidExceptionpublic FileBasedConfig getJGitConfig()
getJGitConfig in class SystemReaderpublic StoredConfig getSystemConfig() throws IOException, ConfigInvalidException
getSystemConfig in class SystemReaderIOExceptionConfigInvalidExceptionpublic String getHostname()
getHostname in class SystemReaderpublic long getCurrentTime()
getCurrentTime in class SystemReaderpublic MonotonicClock getClock()
getClock 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()
public FileBasedConfig openJGitConfig(Config parent, FS fs)
openJGitConfig in class SystemReaderCopyright © 2020 Eclipse JGit Project. All rights reserved.