-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
856 additions
and
295 deletions.
There are no files selected for viewing
8 changes: 0 additions & 8 deletions
8
...e.Runtime.Extensions.AspNetCore.Tests/AspNetCore/ModelBinding/TestClasses/IntBasedEnum.cs
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
...untime.Extensions.AspNetCore.Tests/AspNetCore/ModelBinding/TestClasses/StringBasedEnum.cs
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
...e.Extensions.AspNetCore.Tests/AspNetCore/ModelBinding/TestClasses/StringBasedValueType.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...ns.Json.Tests/Text/Json/Serialization/ValueTypeJsonConverterFactoryTests/JsonTestsBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System.Collections.Generic; | ||
using Thinktecture.Runtime.Tests.TestEnums; | ||
using Thinktecture.Runtime.Tests.Text.Json.Serialization.ValueTypeJsonConverterFactoryTests.TestClasses; | ||
|
||
namespace Thinktecture.Runtime.Tests.Text.Json.Serialization.ValueTypeJsonConverterFactoryTests | ||
{ | ||
public class JsonTestsBase | ||
{ | ||
public static IEnumerable<object[]> DataForStringBasedEnumTest => new[] | ||
{ | ||
new object[] { null, "null" }, | ||
new object[] { TestEnum.Item1, "\"item1\"" }, | ||
new object[] { TestEnum.Item2, "\"item2\"" } | ||
}; | ||
|
||
public static IEnumerable<object[]> DataForExtensibleEnumTest => new[] | ||
{ | ||
new object[] { null, "null" }, | ||
new object[] { ExtensibleTestEnum.Item1, "\"Item1\"" }, | ||
}; | ||
|
||
public static IEnumerable<object[]> DataForExtendedEnumTest => new[] | ||
{ | ||
new object[] { null, "null" }, | ||
new object[] { ExtendedTestEnum.Item1, "\"Item1\"" }, | ||
new object[] { ExtendedTestEnum.Item2, "\"Item2\"" } | ||
}; | ||
|
||
public static IEnumerable<object[]> DataForDifferentAssemblyExtendedTestEnumTest => new[] | ||
{ | ||
new object[] { null, "null" }, | ||
new object[] { DifferentAssemblyExtendedTestEnum.Item1, "\"Item1\"" }, | ||
new object[] { DifferentAssemblyExtendedTestEnum.Item2, "\"Item2\"" } | ||
}; | ||
|
||
public static IEnumerable<object[]> DataForClassWithStringBasedEnumTest => new[] | ||
{ | ||
new object[] { null, "null" }, | ||
new object[] { new ClassWithStringBasedEnum(), "{}", true }, | ||
new object[] { new ClassWithStringBasedEnum(), "{\"Enum\":null}" }, | ||
new object[] { new ClassWithStringBasedEnum(TestEnum.Item1), "{\"Enum\":\"item1\"}" }, | ||
new object[] { new ClassWithStringBasedEnum(TestEnum.Item2), "{\"Enum\":\"item2\"}" } | ||
}; | ||
|
||
public static IEnumerable<object[]> DataForIntBasedEnumTest => new[] | ||
{ | ||
new object[] { null, "null" }, | ||
new object[] { IntegerEnum.Item1, "1" }, | ||
new object[] { IntegerEnum.Item2, "2" } | ||
}; | ||
|
||
public static IEnumerable<object[]> DataForClassWithIntBasedEnumTest => new[] | ||
{ | ||
new object[] { null, "null" }, | ||
new object[] { new ClassWithIntBasedEnum(), "{}", true }, | ||
new object[] { new ClassWithIntBasedEnum(), "{\"Enum\":null}" }, | ||
new object[] { new ClassWithIntBasedEnum(IntegerEnum.Item1), "{\"Enum\":1}" }, | ||
new object[] { new ClassWithIntBasedEnum(IntegerEnum.Item2), "{\"Enum\":2}" } | ||
}; | ||
} | ||
} |
Oops, something went wrong.