Skip to content

Commit

Permalink
fix names
Browse files Browse the repository at this point in the history
  • Loading branch information
xoposhiy committed Mar 17, 2017
1 parent 696a4ec commit b8cffca
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions Exceptions/ConverterProgram_Should.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ public void TearDown()
}


[TestCase("ru", "1")]
[TestCase("ru", "1,12")]
[TestCase("ru", "15.11.1982")]
[TestCase("ru", "1 asdasd")]
[TestCase("ru", "1\n1,12\n15.11.1982\n1 qwe")]
[TestCase("en", "1.12")]
[TestCase("en", "12/31/2017")]
public void ConvertSilently(string sourceCulture, string input)
[TestCase("ru", "1,12", TestName = "double")]
[TestCase("ru", "15.11.1982", TestName = "date")]
[TestCase("ru", "1 asdasd", TestName = "char")]
[TestCase("ru", "1\n1,12\n15.11.1982\n1 qwe", TestName = "mixed")]
[TestCase("en", "1.12", TestName = "en double")]
[TestCase("en", "12/31/2017", TestName = "en date")]
public void Convert(string sourceCulture, string input)
{
Arrange(
new Settings { SourceCultureName = sourceCulture, Verbose = false },
Expand All @@ -53,7 +52,7 @@ public void ConvertSilently(string sourceCulture, string input)
}

[Test]
public void FailGracefully_IfSettingsXmlIncorrect()
public void Fail_IfSettingslIncorrect()
{
File.WriteAllText("settings.xml", "NOT XML AT ALL!");

Expand All @@ -68,7 +67,7 @@ public void FailGracefully_IfSettingsXmlIncorrect()
}

[Test]
public void FailGracefully_WhenFileNotFound()
public void Fail_WhenNoFile()
{
Arrange(Settings.Default, "123");
var filename = Guid.NewGuid().ToString();
Expand All @@ -80,9 +79,9 @@ public void FailGracefully_WhenFileNotFound()
Assert.AreEqual(1, log.Logs.Count);
}

[TestCase("qwe123")]
[TestCase("100500 a")]
public void FailGracefully_WhenFormatIsWrong(string input)
[TestCase("abracadabra", TestName = "abracadabra")]
[TestCase("100500 a", TestName = "wrong char index")]
public void FailOn(string input)
{
Arrange(Settings.Default, input);

Expand All @@ -97,7 +96,7 @@ public void FailGracefully_WhenFormatIsWrong(string input)
}

[Test]
public void UseDefaultSettings_IfSettingsXmlAbsent()
public void UseDefaultSettings_IfNoSettings()
{
Arrange(Settings.Default, "123");
File.Delete("settings.xml");
Expand Down

0 comments on commit b8cffca

Please sign in to comment.