> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class CompareAssertion

Namespace: [OpenTD.Results.Dataset](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset)\
Assembly: OpenTD.Results.dll

Contains a Comparer and an assertion about whether the Datasets it tests
are expected to be equal.

```csharp theme={null}
public class CompareAssertion
```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[CompareAssertion](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.CompareAssertion.md)

## Inherited Members

[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone),
[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### CompareAssertion(Comparer, bool)

```csharp theme={null}
public CompareAssertion(Comparer comparer, bool assertDatasetsSame = true)
```

#### Parameters

`comparer` [Comparer](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.Comparer.md)

`assertDatasetsSame` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### CompareAssertion(IDataset, IDataset, bool)

```csharp theme={null}
public CompareAssertion(IDataset A, IDataset B, bool assertDatasetsSame = true)
```

#### Parameters

`A` [IDataset](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.IDataset.md)

`B` [IDataset](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.IDataset.md)

`assertDatasetsSame` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Properties

### AssertDatasetsSame

```csharp theme={null}
public bool AssertDatasetsSame { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Comparer

```csharp theme={null}
public Comparer Comparer { get; set; }
```

#### Property Value

[Comparer](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.Comparer.md)

### Message

```csharp theme={null}
public string Message { get; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Success

```csharp theme={null}
public bool Success { get; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Methods

### ResetResult()

```csharp theme={null}
public void ResetResult()
```

### TestAssertion()

```csharp theme={null}
public bool TestAssertion()
```

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)
