mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Removes the redundant contract and enumeration tests
This commit is contained in:
1 parent
4dce426b38
commit
dc2692e208
127 files changed
-6721
No files matched your search
-46
@@ -48,50 +48,4 @@ public class PluginSettingDescriptorDtoTests
|
||||
Assert.Null(result.DefaultValue);
|
||||
Assert.Null(result.AllowedValues);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Equality_WhenTwoDescriptorsHaveTheSameValues_ShouldBeEqual()
|
||||
{
|
||||
// Arrange
|
||||
IReadOnlyList<string> allowedValues = ["A"];
|
||||
|
||||
// Act
|
||||
PluginSettingDescriptorDto first = _pluginSettingDescriptorDtoFixture.Create(key: "Key", label: "Label", type: PluginSettingType.Text, defaultValue: "value", allowedValues: allowedValues);
|
||||
PluginSettingDescriptorDto second = _pluginSettingDescriptorDtoFixture.Create(key: "Key", label: "Label", type: PluginSettingType.Text, defaultValue: "value", allowedValues: allowedValues);
|
||||
bool result = first == second;
|
||||
|
||||
// Assert
|
||||
Assert.True(result);
|
||||
Assert.Equal(first, second);
|
||||
Assert.Equal(first.GetHashCode(), second.GetHashCode());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Equality_WhenDescriptorsHaveDifferentAllowedValueInstances_ShouldNotBeEqual()
|
||||
{
|
||||
// Arrange
|
||||
PluginSettingDescriptorDto first = _pluginSettingDescriptorDtoFixture.Create(key: "Key", label: "Label", type: PluginSettingType.Text, defaultValue: "value", allowedValues: ["A"]);
|
||||
PluginSettingDescriptorDto second = _pluginSettingDescriptorDtoFixture.Create(key: "Key", label: "Label", type: PluginSettingType.Text, defaultValue: "value", allowedValues: ["A"]);
|
||||
|
||||
// Act
|
||||
bool result = first == second;
|
||||
|
||||
// Assert
|
||||
Assert.False(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Equality_WhenTwoDescriptorsHaveDifferentKeys_ShouldNotBeEqual()
|
||||
{
|
||||
// Arrange
|
||||
PluginSettingDescriptorDto first = _pluginSettingDescriptorDtoFixture.Create(key: "KeyOne", label: "Label", type: PluginSettingType.Text);
|
||||
PluginSettingDescriptorDto second = _pluginSettingDescriptorDtoFixture.Create(key: "KeyTwo", label: "Label", type: PluginSettingType.Text);
|
||||
|
||||
// Act
|
||||
bool result = first == second;
|
||||
|
||||
// Assert
|
||||
Assert.False(result);
|
||||
Assert.NotEqual(first, second);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user