Skip to content

Commit 9dd2e47

Browse files
committed
Added OfType methods to BaseAttributesTestBuilder{TAttributesTestBuilder} (#148)
1 parent 2b0d307 commit 9dd2e47

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/MyTested.AspNetCore.Mvc.Abstractions/Builders/Data/BaseDataProviderWithStringKeyTestBuilder.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,28 @@ public TDataProviderTestBuilder ContainingEntryWithValue<TValue>(TValue value)
4747
/// <inheritdoc />
4848
public TDataProviderTestBuilder ContainingEntryOfType<TValue>()
4949
{
50-
this.ValidateContainingEntryOfType<TValue>();
50+
this.ContainingEntryOfType(typeof(TValue));
51+
return this.DataProviderTestBuilder;
52+
}
53+
54+
/// <inheritdoc />
55+
public TDataProviderTestBuilder ContainingEntryOfType(Type valueType)
56+
{
57+
this.ValidateContainingEntryOfType(valueType);
5158
return this.DataProviderTestBuilder;
5259
}
5360

5461
/// <inheritdoc />
5562
public TDataProviderTestBuilder ContainingEntryOfType<TValue>(string key)
5663
{
57-
this.ValidateContainingEntryOfType<TValue>(key);
64+
this.ContainingEntryOfType(key,typeof(TValue));
65+
return this.DataProviderTestBuilder;
66+
}
67+
68+
/// <inheritdoc />
69+
public TDataProviderTestBuilder ContainingEntryOfType(string key,Type valueType)
70+
{
71+
this.ValidateContainingEntryOfType(key, valueType);
5872
return this.DataProviderTestBuilder;
5973
}
6074

0 commit comments

Comments
 (0)