-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from DFE-Digital/feature/reference-nuget-regi…
…stry added a ref to the nuget registry
- Loading branch information
Showing
8 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"dotnet.defaultSolution": "Dfe.Academies.Academisation.sln" | ||
} |
31 changes: 31 additions & 0 deletions
31
Dfe.Academies.Academisation.Service.UnitTest/Extensions/StringExtensionsTests.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,31 @@ | ||
namespace Dfe.Academies.Academisation.Service.UnitTest.Extensions; | ||
using Dfe.Academies.Academisation.Service.Extensions; | ||
using Xunit; | ||
|
||
/// <summary> | ||
/// The string extensions tests. | ||
/// </summary> | ||
public class StringExtensionsTests | ||
{ | ||
/// <summary> | ||
/// The to title case tests. | ||
/// </summary> | ||
public class ToTitleCaseTests | ||
{ | ||
/// <summary> | ||
/// Givens the string_ should convert to title case. | ||
/// </summary> | ||
/// <param name="givenString">The given string.</param> | ||
/// <param name="expectedStringAsTitleCase">The expected string as title case.</param> | ||
[Theory] | ||
[InlineData(null, null)] | ||
[InlineData("", "")] | ||
[InlineData("All Title Case", "All Title Case")] | ||
[InlineData("all lower case", "All Lower Case")] | ||
public void GivenString_ShouldConvertToTitleCase(string givenString, string expectedStringAsTitleCase) | ||
{ | ||
string? result = givenString?.ToTitleCase(); | ||
Assert.Equal(expectedStringAsTitleCase, result); | ||
} | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
Dfe.Academies.Academisation.Service/Extensions/StringExtensions.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,18 @@ | ||
namespace Dfe.Academies.Academisation.Service.Extensions; | ||
using Dfe.Academisation.ExtensionMethods; | ||
|
||
/// <summary> | ||
/// The string extensions. | ||
/// </summary> | ||
internal static class StringExtensions | ||
{ | ||
/// <summary> | ||
/// Title cases a string. Not used, just added to test nuget reference. | ||
/// </summary> | ||
/// <param name="string">The string.</param> | ||
/// <returns>A string.</returns> | ||
public static string ToTitleCase(this string @string) | ||
{ | ||
return Dfe.Academisation.ExtensionMethods.StringExtensions.ToTitleCase(@string); | ||
} | ||
} |
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