Skip to content

Instantly share code, notes, and snippets.

@selcukusta
Created December 20, 2017 13:20
Show Gist options
  • Select an option

  • Save selcukusta/5ae6324ae4c668ed0348530df253c103 to your computer and use it in GitHub Desktop.

Select an option

Save selcukusta/5ae6324ae4c668ed0348530df253c103 to your computer and use it in GitHub Desktop.
[Fact]
public void ToPrettyDate_ShouldArgumentNullException_WhenCultureIsNull()
{
var result = Record.Exception(() => DateTime.Now.ToPrettyDate(null));
Assert.NotNull(result);
var exception = Assert.IsType<ArgumentNullException>(result);
var actual = exception.ParamName;
const string expected = "culture";
Assert.Equal(expected, actual);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment