Created
December 20, 2017 13:35
-
-
Save selcukusta/961175785928e1e744909e35f7f77746 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| [Theory, InlineData(new object[] { "de-DE", "2017.12.19", "19 Dezember 2017" })] | |
| public void ToPrettyDate_ShouldAssertTrue_WhenCultureIsGerman(string cultureCode, string textDate, string expected) | |
| { | |
| var culture = CultureInfo.CreateSpecificCulture(cultureCode); | |
| var date = DateTime.ParseExact(textDate, "yyyy.MM.dd", culture); | |
| var actual = date.ToPrettyDate(culture); | |
| Assert.Equal(expected, actual); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment