When I check Equals on record struct I got unexpected result.
you can see it with the following code snippets:
public enum S3EnvironmentConvention
{
None,
BucketPrefix,
PathPrefix
}
public record struct S3Options
{
public string? Bucket { get; init; }
public string? BasePath { get; init; }
public S3EnvironmentConvention EnvironmentConvension { get; init; } = S3EnvironmentConvention.None;
}
TEST
[Fact]
public void S3Options_Equals_Test()
{
var x = new S3Options { BasePath = "p/a/t/h", Bucket = "root" };
var y = new S3Options { BasePath = "p/a/t/h" };
Assert.False(x.Equals(y));
}
When I check Equals on record struct I got unexpected result.
you can see it with the following code snippets:
TEST