Skip to content

Commit f9c0b17

Browse files
committed
Added OfType methods to IViewDataTestBuilder (#148)
1 parent 4b04145 commit f9c0b17

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/MyTested.AspNetCore.Mvc.ViewData/Builders/Contracts/Data/IViewDataTestBuilder.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ public interface IViewDataTestBuilder
3030
/// <returns>The same <see cref="IAndViewDataTestBuilder"/>.</returns>
3131
IAndViewDataTestBuilder ContainingEntryOfType<TValue>();
3232

33+
/// <summary>
34+
/// Tests whether the <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary"/> contains entry with value of the provided type.
35+
/// </summary>
36+
/// <returns>The same <see cref="IAndViewDataTestBuilder"/>.</returns>
37+
IAndViewDataTestBuilder ContainingEntryOfType(Type valueType);
38+
3339
/// <summary>
3440
/// Tests whether the <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary"/> contains entry with value of the provided type and the given key.
3541
/// </summary>
@@ -38,6 +44,15 @@ public interface IViewDataTestBuilder
3844
/// <returns>The same <see cref="IAndViewDataTestBuilder"/>.</returns>
3945
IAndViewDataTestBuilder ContainingEntryOfType<TValue>(string key);
4046

47+
48+
/// <summary>
49+
/// Tests whether the <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary"/> contains entry with value of the provided type and the given key.
50+
/// </summary>
51+
/// <param name="key">Key of the view data entry.</param>
52+
/// <param name="valueType"></param>
53+
/// <returns>The same <see cref="IAndViewDataTestBuilder"/>.</returns>
54+
IAndViewDataTestBuilder ContainingEntryOfType(string key,Type valueType);
55+
4156
/// <summary>
4257
/// Tests whether the <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary"/> contains entry with the provided key and corresponding value.
4358
/// </summary>

0 commit comments

Comments
 (0)