Class Overview
Hamcrest matcher used to verify that a JIRA XML backup has a given build number in it. This is used in upgrade task
tests to ensure that the upgrade is actually being performed.
Summary
Public Constructors |
|
BuildNumberMatcher(int expectedBuildNumber)
Creates a new BuildNumberMatcher.
|
[Expand]
Inherited Methods |
From class
com.atlassian.jira.functest.matcher.DocumentMatcher
|
From class
org.hamcrest.TypeSafeMatcher
final
void
|
describeMismatch(Object arg0, Description arg1)
|
void
|
describeMismatchSafely(T arg0, Description arg1)
|
final
boolean
|
matches(Object arg0)
|
abstract
boolean
|
matchesSafely(T arg0)
|
|
From class
org.hamcrest.BaseMatcher
final
void
|
_dont_implement_Matcher___instead_extend_BaseMatcher_()
|
String
|
toString()
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
org.hamcrest.Matcher
void
|
_dont_implement_Matcher___instead_extend_BaseMatcher_()
|
boolean
|
matches(Object arg0)
|
|
From interface
org.hamcrest.SelfDescribing
void
|
describeTo(Description arg0)
|
|
Public Constructors
public
BuildNumberMatcher
(int expectedBuildNumber)
Creates a new BuildNumberMatcher.
Parameters
expectedBuildNumber
| a build number
|
Public Methods
public
void
describeTo
(Description description)
public
static
BuildNumberMatcher
hasBuildNumber
(int buildNumber)
Does the backup file have the given build number.
Parameters
buildNumber
| a build number |
Protected Methods
protected
boolean
matchesDocument
(Document doc)
protected
int
readBuildNumberFrom
(Document doc)
Reads the build number from a JIRA XML backup using DOM + XPath.
Parameters
doc
| a Document containing the XML backup |
Returns
- an int containing the build number