org.nuiton.jredmine
Class TestHelper

java.lang.Object
  extended by org.nuiton.jredmine.TestHelper

public abstract class TestHelper
extends java.lang.Object

Since:
1.0.0
Author:
chemit

Field Summary
protected static java.io.File basedir
           
protected static org.nuiton.io.rest.RestClientConfiguration DEFAULT_CONFIGURATION
           
protected static java.util.Properties defaultConfig
           
protected static java.util.EnumMap<org.nuiton.jredmine.model.RedmineModelEnum,java.util.List<?>> memoryModel
           
protected static java.util.Properties userConfig
           
 
Constructor Summary
TestHelper()
           
 
Method Summary
static void assertMyEquals(java.lang.Class<?> type, java.lang.Object expected, java.lang.Object actual)
           
static
<T> void
assertMyListEquals(java.lang.Class<T> type, java.util.List<T> expecteds, T... actuals)
           
static void copyConfiguration(org.nuiton.io.rest.RestClientConfiguration src, org.nuiton.io.rest.RestClientConfiguration dst)
           
static java.util.List<org.nuiton.jredmine.model.Attachment> getAttachments()
           
static java.io.File getBasedir()
           
static java.io.File getFile(java.io.File base, java.lang.String... paths)
           
static java.util.List<org.nuiton.jredmine.model.Issue> getIssues()
           
static java.util.EnumMap<org.nuiton.jredmine.model.RedmineModelEnum,java.util.List<?>> getMemoryModel()
           
static
<T> java.util.List<T>
getModel(java.lang.Class<T> type)
           
static java.util.List<org.nuiton.jredmine.model.Project> getProjects()
           
static java.lang.String getRelativePath(java.io.File base, java.io.File file)
           
static org.nuiton.io.rest.RestClientConfiguration getTestConfiguration()
           
static java.io.File getTestDir(java.lang.String type, java.lang.String prefix)
           
static java.util.List<org.nuiton.jredmine.model.Tracker> getTrackers()
           
static java.util.List<org.nuiton.jredmine.model.User> getUsers()
           
static java.util.List<org.nuiton.jredmine.model.Version> getVersions()
           
static void initDefaultConfiguration()
           
static boolean isVerbose()
           
static void loadMemoryModel()
           
static void setBasedir(java.io.File basedir)
           
static void tearDownClass()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

basedir

protected static java.io.File basedir

DEFAULT_CONFIGURATION

protected static org.nuiton.io.rest.RestClientConfiguration DEFAULT_CONFIGURATION

defaultConfig

protected static java.util.Properties defaultConfig

userConfig

protected static java.util.Properties userConfig

memoryModel

protected static java.util.EnumMap<org.nuiton.jredmine.model.RedmineModelEnum,java.util.List<?>> memoryModel
Constructor Detail

TestHelper

public TestHelper()
Method Detail

initDefaultConfiguration

public static void initDefaultConfiguration()
                                     throws java.io.IOException
Throws:
java.io.IOException

getTestConfiguration

public static org.nuiton.io.rest.RestClientConfiguration getTestConfiguration()
                                                                       throws java.io.IOException
Throws:
java.io.IOException

copyConfiguration

public static void copyConfiguration(org.nuiton.io.rest.RestClientConfiguration src,
                                     org.nuiton.io.rest.RestClientConfiguration dst)

getBasedir

public static java.io.File getBasedir()
Returns:
the basedir for all tests

setBasedir

public static void setBasedir(java.io.File basedir)

isVerbose

public static boolean isVerbose()

getTestDir

public static java.io.File getTestDir(java.lang.String type,
                                      java.lang.String prefix)

getFile

public static java.io.File getFile(java.io.File base,
                                   java.lang.String... paths)

getRelativePath

public static java.lang.String getRelativePath(java.io.File base,
                                               java.io.File file)

getAttachments

public static java.util.List<org.nuiton.jredmine.model.Attachment> getAttachments()

getIssues

public static java.util.List<org.nuiton.jredmine.model.Issue> getIssues()

getProjects

public static java.util.List<org.nuiton.jredmine.model.Project> getProjects()

getTrackers

public static java.util.List<org.nuiton.jredmine.model.Tracker> getTrackers()

getUsers

public static java.util.List<org.nuiton.jredmine.model.User> getUsers()

getVersions

public static java.util.List<org.nuiton.jredmine.model.Version> getVersions()

getModel

public static <T> java.util.List<T> getModel(java.lang.Class<T> type)

tearDownClass

public static void tearDownClass()
                          throws java.lang.Exception
Throws:
java.lang.Exception

assertMyListEquals

public static <T> void assertMyListEquals(java.lang.Class<T> type,
                                          java.util.List<T> expecteds,
                                          T... actuals)
                               throws java.lang.Exception
Throws:
java.lang.Exception

assertMyEquals

public static void assertMyEquals(java.lang.Class<?> type,
                                  java.lang.Object expected,
                                  java.lang.Object actual)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getMemoryModel

public static java.util.EnumMap<org.nuiton.jredmine.model.RedmineModelEnum,java.util.List<?>> getMemoryModel()

loadMemoryModel

public static void loadMemoryModel()
                            throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2009 CodeLutin. All Rights Reserved.