com.atlassian.bamboo.utils
Class BambooMockitoTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.bamboo.utils.BambooMockitoTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class BambooMockitoTestCase
extends junit.framework.TestCase


Field Summary
protected  java.io.File temporaryDirectory
           
 
Constructor Summary
BambooMockitoTestCase()
           
 
Method Summary
protected  void _preserveSystemProperties(SystemProperty... properties)
           
protected
<T> void
assertCollectionsHaveEqualElements(java.util.Collection<T> a, java.util.Collection<T> b)
           
protected static void assertContentTextEquals(java.io.InputStream expected, java.io.InputStream actual, boolean trimLines)
           
protected static void assertContentTextEquals(java.io.Reader expected, java.io.Reader actual, boolean trimLines)
           
protected static void assertXmlEquals(org.dom4j.Document expected, org.dom4j.Document actual)
          Dumb implementation of XML comparison.
protected static void assertXmlEquals(org.dom4j.Element expected, org.dom4j.Element actual)
          Dumb implementation
protected static void assertXmlEquals(java.io.InputStream expected, java.io.InputStream actual)
           
protected static void assertXmlEquals(java.io.Reader expected, java.io.Reader actual)
           
protected  Plan mockPlanAndStubPlanManager(PlanManager planManager, PlanKey planKey)
           
protected
<T extends Plan>
T
mockPlanAndStubPlanManager(PlanManager planManager, PlanKey planKey, java.lang.Class<T> planClass)
           
protected  Plan mockPlanAndStubPlanManager(PlanManager planManager, java.lang.String planKey)
           
protected  void setUp()
          Initialize all @Mock annotated fields
protected  void stubHttpServletRequest(javax.servlet.http.HttpServletRequest request, java.lang.String scheme, java.lang.String serverName, int serverPort, java.lang.String contextPath, java.lang.String servletPath)
           
protected  void tearDown()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

temporaryDirectory

protected java.io.File temporaryDirectory
Constructor Detail

BambooMockitoTestCase

public BambooMockitoTestCase()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Initialize all @Mock annotated fields

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

_preserveSystemProperties

protected void _preserveSystemProperties(SystemProperty... properties)

mockPlanAndStubPlanManager

protected Plan mockPlanAndStubPlanManager(@NotNull
                                          PlanManager planManager,
                                          @NotNull
                                          java.lang.String planKey)

mockPlanAndStubPlanManager

protected Plan mockPlanAndStubPlanManager(@NotNull
                                          PlanManager planManager,
                                          @NotNull
                                          PlanKey planKey)

mockPlanAndStubPlanManager

protected <T extends Plan> T mockPlanAndStubPlanManager(@NotNull
                                                        PlanManager planManager,
                                                        @NotNull
                                                        PlanKey planKey,
                                                        java.lang.Class<T> planClass)

stubHttpServletRequest

protected void stubHttpServletRequest(@NotNull
                                      javax.servlet.http.HttpServletRequest request,
                                      java.lang.String scheme,
                                      java.lang.String serverName,
                                      int serverPort,
                                      java.lang.String contextPath,
                                      java.lang.String servletPath)

assertCollectionsHaveEqualElements

protected <T> void assertCollectionsHaveEqualElements(java.util.Collection<T> a,
                                                      java.util.Collection<T> b)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

assertContentTextEquals

protected static void assertContentTextEquals(java.io.Reader expected,
                                              java.io.Reader actual,
                                              boolean trimLines)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

assertContentTextEquals

protected static void assertContentTextEquals(java.io.InputStream expected,
                                              java.io.InputStream actual,
                                              boolean trimLines)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

assertXmlEquals

protected static void assertXmlEquals(org.dom4j.Element expected,
                                      org.dom4j.Element actual)
                               throws java.lang.Exception
Dumb implementation

Parameters:
expected -
actual -
Throws:
java.lang.Exception

assertXmlEquals

protected static void assertXmlEquals(org.dom4j.Document expected,
                                      org.dom4j.Document actual)
                               throws java.lang.Exception
Dumb implementation of XML comparison.

Parameters:
expected -
actual -
Throws:
java.lang.Exception

assertXmlEquals

protected static void assertXmlEquals(java.io.Reader expected,
                                      java.io.Reader actual)
                               throws java.lang.Exception
Throws:
java.lang.Exception

assertXmlEquals

protected static void assertXmlEquals(java.io.InputStream expected,
                                      java.io.InputStream actual)
                               throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2010 Atlassian. All Rights Reserved.