Einen neuen Test für IEnumerable zu BaseDtoTest hinzugefügt.
This commit is contained in:
parent
0e0f78aaa2
commit
132183e1d8
@ -75,5 +75,21 @@ namespace DigitalData.Core.Tests.DTO
|
|||||||
|
|
||||||
Assert.IsFalse(dto1 != dto2);
|
Assert.IsFalse(dto1 != dto2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void EntityWithSameIdShouldBeContained()
|
||||||
|
{
|
||||||
|
IEnumerable<SampleDto> dtos = new List<SampleDto>() { new(1), new(2) };
|
||||||
|
var dto = new SampleDto(1);
|
||||||
|
Assert.That(dtos, Does.Contain(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void EntityWithSameIdShouldBeNotContained()
|
||||||
|
{
|
||||||
|
IEnumerable<SampleDto> dtos = new List<SampleDto>() { new(1), new(2) };
|
||||||
|
var dto = new SampleDto(3);
|
||||||
|
Assert.That(dtos, !Does.Contain(dto));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user