Class CompareSuite
Last update: 09.03.2026Namespace: OpenTD.Results.Dataset
Assembly: OpenTD.Results.dll
Use a CompareSuite to test whether multiple pairs of Datasets are equal or not. Tests a set of CompareAssertions and collects the results.
public class CompareSuite : IList<CompareAssertion>, ICollection<CompareAssertion>, IEnumerable<CompareAssertion>, IEnumerable
Inheritance
Implements
IList<CompareAssertion>, ICollection<CompareAssertion>, IEnumerable<CompareAssertion>, IEnumerable
Inherited Members
object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()
Properties
Count
Gets the number of elements contained in the
public int Count { get; }
Property Value
IsReadOnly
Gets a value indicating whether the
public bool IsReadOnly { get; }
Property Value
Log
public string Log { get; set; }
Property Value
Message
public string Message { get; }
Property Value
this[int]
Gets or sets the element at the specified index.
public CompareAssertion this[int index] { get; set; }
Property Value
Exceptions
index is not a valid index in the
The property is set and the
Methods
Add(IDataset, IDataset, bool)
public void Add(IDataset a, IDataset b, bool assertDatasetsSame)
Parameters
a IDataset
b IDataset
assertDatasetsSame bool
Add(CompareAssertion)
Adds an item to the
public void Add(CompareAssertion item)
Parameters
item CompareAssertion
The object to add to the
Exceptions
The
Clear()
Removes all items from the
public void Clear()
Exceptions
The
Contains(CompareAssertion)
Determines whether the
public bool Contains(CompareAssertion item)
Parameters
item CompareAssertion
The object to locate in the
Returns
true if item is found in the
CopyTo(CompareAssertion[], int)
Copies the elements of the
public void CopyTo(CompareAssertion[] array, int arrayIndex)
Parameters
array CompareAssertion[]
The one-dimensional
arrayIndex int
The zero-based index in array at which copying begins.
Exceptions
array is null.
arrayIndex is less than 0.
The number of elements in the source arrayIndex to the end of the destination array.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<CompareAssertion> GetEnumerator()
Returns
An enumerator that can be used to iterate through the collection.
IndexOf(CompareAssertion)
Determines the index of a specific item in the
public int IndexOf(CompareAssertion item)
Parameters
item CompareAssertion
The object to locate in the
Returns
The index of item if found in the list; otherwise, -1.
Insert(int, CompareAssertion)
Inserts an item to the
public void Insert(int index, CompareAssertion item)
Parameters
index int
The zero-based index at which item should be inserted.
item CompareAssertion
The object to insert into the
Exceptions
index is not a valid index in the
The
Remove(CompareAssertion)
Removes the first occurrence of a specific object from the
public bool Remove(CompareAssertion item)
Parameters
item CompareAssertion
The object to remove from the
Returns
true if item was successfully removed from the item is not found in the original
Exceptions
The
RemoveAt(int)
Removes the
public void RemoveAt(int index)
Parameters
index int
The zero-based index of the item to remove.
Exceptions
index is not a valid index in the
The
Run()
public Tuple<int, int> Run()