Class ChangeHistoryList
java.lang.Object
com.atlassian.jira.functest.framework.changehistory.ChangeHistoryList
- All Implemented Interfaces:
Iterable,Collection,List,SequencedCollection
This represents a simple object model for testing change history. A ChangeHistoryList
is a list of
ChangeHistorySet objects.
The order of change history field items is database dependant and hence the order of the items
can be gauranteed. Hence the name ChangeHistorySet
However the order of the each set of changes is time dependant and hence can be represented by a list hence the name {ChangeHistoryList}.
You can use this class using a fluent object notation like this :
ChangeHistoryList expectedList = new ChangeHistoryList();
expectedList.addChangeSet("Administrator")
.add("Time Spent", "1 hour [ 3600 ]")
.add("Remaining Estimate", "1 week [ 604800 ]");
expectedList.addChangeSet("Administrator")
.add("Time Spent", "2 hours [ 7200 ]")
.add("Remaining Estimate", "3 days [ 259200 ]");
expectedList.addChangeSet("Administrator")
.add("Time Spent", "1 day, 2 hours [ 93600 ] ")
.add("Remaining Estimate", "2 days [ 172800 ]");
expectedList.addChangeSet("Administrator")
.add("Time Spent", "2 days, 2 hours [ 180000 ] ");
try
{
ChangeHistoryList actualList = ChangeHistoryParser.getChangeHistory(getDialog());
actualList.assertContainsChangeHistory(expectedList);
}
catch (Error e)
{
dumpResponse(e);
throw e;
}
- Since:
- v3.13
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection c) booleanaddAll(Collection c) addChangeSet(String changedBy) addChangeSet(String changedBy, String id) voidassertContainsChangeHistory(ChangeHistoryList expectedChangeHistoryList) Asserts that thisChangeHistoryListcontains the list ofinvalid input: ') objects in expectedChangeHistoryList. Note that this is a "contains" test and hence it may have more change history than specified in expectedChangeHistoryList but not less. @param expectedChangeHistoryList the list of expected ChangeHistoryEntry items @throws AssertionFailedError if this {@link ChangeHistoryList } does not contain all of the expected change history'voidassertContainsSomeOf(ChangeHistoryList expectedChangeHistoryList) voidclear()booleanbooleanbooleancontainsSomeOf(ChangeHistorySet changeHistorySet) Returns true if this ChangeHistoryList contains some of the provided ChangeHistorySetbooleanget(int index) inthashCode()intbooleanisEmpty()iterator()intlistIterator(int index) remove(int index) booleanbooleanbooleanintsize()subList(int fromIndex, int toIndex) Object[]toArray()Object[]toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
ChangeHistoryList
public ChangeHistoryList()
-
-
Method Details
-
addChangeSet
-
addChangeSet
-
assertContainsChangeHistory
Asserts that thisChangeHistoryListcontains the list ofinvalid input: ') objects in expectedChangeHistoryList. Note that this is a "contains" test and hence it may have more change history than specified in expectedChangeHistoryList but not less. @param expectedChangeHistoryList the list of expected ChangeHistoryEntry items @throws AssertionFailedError if this {@link ChangeHistoryList } does not contain all of the expected change history' -
assertContainsSomeOf
-
containsSomeOf
Returns true if this ChangeHistoryList contains some of the provided ChangeHistorySet- Parameters:
changeHistorySet- the ChangeHistorySet to see if we contain some of it- Returns:
- true if we contain some of the ChangeHistorySet
-
size
public int size()- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceList
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceList
-
contains
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceList
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList
-
add
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceList
-
remove
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceList
-
containsAll
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceList
-
addAll
- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceList
-
addAll
-
removeAll
- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceList
-
retainAll
- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceList
-
clear
public void clear()- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceList
-
equals
-
hashCode
public int hashCode() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList
-
listIterator
- Specified by:
listIteratorin interfaceList
-
listIterator
- Specified by:
listIteratorin interfaceList
-
subList
-
toString
-