I noticed that it is possible to have equality of two different implementations of the TypedIdValueBase, if the underlying Guid is the same. I think, this shouldn't be the case, should it?
For example, I would expect this test to turn green:
public class DifferentTypedIdWithSameGuidTests
{
[Test]
public void Test()
{
var commonId = Guid.NewGuid();
var firstId = new FirstEntityId(commonId);
var secondId = new SecondEntityId(commonId);
Assert.False(firstId.Equals(secondId));
}
}
public class FirstEntityId : TypedIdValueBase
{
public FirstEntityId(Guid value)
: base(value)
{
}
}
public class SecondEntityId : TypedIdValueBase
{
public SecondEntityId(Guid value)
: base(value)
{
}
}
Hi there,
I noticed that it is possible to have equality of two different implementations of the TypedIdValueBase, if the underlying Guid is the same. I think, this shouldn't be the case, should it?
For example, I would expect this test to turn green:
Best regards, David