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  Plan mockBuildAndStubPlanDao(PlanDao planDao, java.lang.String planKey)
           
protected  ExtendedBuildResultsSummary mockBuildResultsSummaryAndStubManager(BuildResultsSummaryDao dao, java.lang.String buildResultKey)
           
protected  ExtendedBuildResultsSummary mockBuildResultsSummaryAndStubManager(BuildResultsSummaryManager manager, java.lang.String buildResultKey)
           
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)

mockBuildAndStubPlanDao

protected Plan mockBuildAndStubPlanDao(@NotNull
                                       PlanDao planDao,
                                       @NotNull
                                       java.lang.String planKey)

mockBuildResultsSummaryAndStubManager

protected ExtendedBuildResultsSummary mockBuildResultsSummaryAndStubManager(@NotNull
                                                                            BuildResultsSummaryManager manager,
                                                                            @NotNull
                                                                            java.lang.String buildResultKey)

mockBuildResultsSummaryAndStubManager

protected ExtendedBuildResultsSummary mockBuildResultsSummaryAndStubManager(@NotNull
                                                                            BuildResultsSummaryDao dao,
                                                                            @NotNull
                                                                            java.lang.String buildResultKey)

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


Copyright © 2010 Atlassian. All Rights Reserved.