Skip to content

Commit e139c8a

Browse files
author
stankovT
committed
Clean up (#148)
1 parent 9a6a752 commit e139c8a

File tree

7 files changed

+16
-19
lines changed

7 files changed

+16
-19
lines changed

src/MyTested.AspNetCore.Mvc.Abstractions/Utilities/Validators/DictionaryValidator.cs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,21 @@ public static void ValidateValueOfType<TValue>(
5959
string name,
6060
IDictionary<object, object> dictionary,
6161
Action<string, string, string> failedValidationAction)
62-
{
63-
ValidateValueOfType<TValue>(name, dictionary.Values, failedValidationAction);
64-
}
65-
62+
=> ValidateValueOfType<TValue>(name, dictionary.Values, failedValidationAction);
63+
6664
public static void ValidateValueOfType(
6765
string name,
6866
IDictionary<object, object> dictionary,
69-
Action<string, string, string> failedValidationAction,Type valueType)
70-
{
71-
ValidateValueOfType(name, dictionary.Values, failedValidationAction, valueType);
72-
}
73-
67+
Action<string, string, string> failedValidationAction,
68+
Type valueType)
69+
=> ValidateValueOfType(name, dictionary.Values, failedValidationAction, valueType);
70+
7471
public static void ValidateStringKeyAndValueOfType(
7572
string name,
7673
IDictionary<string, object> dictionary,
7774
string key,
78-
Action<string, string, string> failedValidationAction, Type valueType)
75+
Action<string, string, string> failedValidationAction,
76+
Type valueType)
7977
{
8078
var entryExists = dictionary.ContainsKey(key);
8179
var actualValue = entryExists ? dictionary[key] : null;
@@ -97,8 +95,6 @@ public static void ValidateStringKeyAndValueOfType<TValue>(
9795
Action<string, string, string> failedValidationAction)
9896
=> ValidateStringKeyAndValueOfType(name, dictionary, key, failedValidationAction, typeof(TValue));
9997

100-
101-
10298
public static void ValidateValue<TDictionaryKey, TValue>(
10399
string name,
104100
IDictionary<TDictionaryKey, object> dictionary,
@@ -147,7 +143,8 @@ public static void ValidateValues(
147143
private static void ValidateValueOfType(
148144
string name,
149145
ICollection<object> values,
150-
Action<string, string, string> failedValidationAction,Type valueType)
146+
Action<string, string, string> failedValidationAction,
147+
Type valueType)
151148
{
152149
var entryOfSameType = values.FirstOrDefault(arg => arg.GetType() == valueType);
153150

src/MyTested.AspNetCore.Mvc.Caching/Builders/Data/MemoryCache/MemoryCacheTestBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public IAndMemoryCacheTestBuilder ContainingEntryOfType<TValue>()
6969
=> this.ContainingEntryOfType(typeof(TValue));
7070

7171
/// <inheritdoc />
72-
public IAndMemoryCacheTestBuilder ContainingEntryOfType(object key,Type valueType)
72+
public IAndMemoryCacheTestBuilder ContainingEntryOfType(object key, Type valueType)
7373
{
7474
var value = this.GetValue(key);
7575
var actualType = value.GetType();

src/MyTested.AspNetCore.Mvc.Controllers.ActionResults/FileTestBuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static IAndFileTestBuilder WithFileProviderOfType<TFileProvider>(
132132
/// <param name="fileProviderType"></param>
133133
/// <returns>The same <see cref="IAndFileTestBuilder"/>.</returns>
134134
public static IAndFileTestBuilder WithFileProviderOfType(
135-
this IFileTestBuilder fileTestBuilder,Type fileProviderType)
135+
this IFileTestBuilder fileTestBuilder, Type fileProviderType)
136136
{
137137
var actualBuilder = GetFileTestBuilder<VirtualFileResult>(fileTestBuilder, FileProvider);
138138

src/MyTested.AspNetCore.Mvc.Controllers.ActionResults/Utilities/Validators/OutputFormatterValidator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public static void ValidateContainingOutputFormatterOfType<TOutputFormatter>(
5151
/// <param name="outputFromatterType"></param>
5252
public static void ValidateContainingOutputFormatterOfType(
5353
ObjectResult objectResult,
54-
Action<string, string, string> failedValidationAction,Type outputFromatterType)
54+
Action<string, string, string> failedValidationAction,
55+
Type outputFromatterType)
5556
{
5657
var outputFormatters = objectResult.Formatters;
5758

src/MyTested.AspNetCore.Mvc.Controllers.ActionResults/Utilities/Validators/RouteActionResultValidator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ public static void ValidateUrlHelper(
240240
/// <param name="urlHelperType"></param>
241241
public static void ValidateUrlHelperOfType(
242242
dynamic actionResult,
243-
Action<string, string, string> failedValidationAction,Type urlHelperType)
243+
Action<string, string, string> failedValidationAction,
244+
Type urlHelperType)
244245
{
245246
RuntimeBinderValidator.ValidateBinding(() =>
246247
{

src/MyTested.AspNetCore.Mvc.Controllers.Views.ActionResults/Builders/Contracts/ActionResults/Json/IJsonSerializerSettingsTestBuilder.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ IAndJsonSerializerSettingsTestBuilder ContainingConverterOfType<TJsonConverter>(
7777
/// <returns>The same <see cref="IAndJsonSerializerSettingsTestBuilder"/>.</returns>
7878
IAndJsonSerializerSettingsTestBuilder ContainingConverterOfType(Type jsonConverterType);
7979

80-
8180
/// <summary>
8281
/// Tests whether the <see cref="JsonSerializerSettings"/> contains
8382
/// the provided <see cref="JsonConverter"/> objects.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public interface IViewDataTestBuilder
4444
/// <returns>The same <see cref="IAndViewDataTestBuilder"/>.</returns>
4545
IAndViewDataTestBuilder ContainingEntryOfType<TValue>(string key);
4646

47-
4847
/// <summary>
4948
/// Tests whether the <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary"/> contains entry with value of the provided type and the given key.
5049
/// </summary>

0 commit comments

Comments
 (0)