Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Jukka Snellman committed Aug 19, 2022
1 parent 24b21a1 commit 6da1544
Showing 1 changed file with 8 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,21 @@ private void TestGetString(string expected, string key, string[] arguments, Cult
}

[Fact]
public void GetString_Invariant()
{
TestGetString("Hello World", "Hello", CultureInfo.InvariantCulture);
}
public void GetString_Invariant() => TestGetString("Hello World", "Hello", CultureInfo.InvariantCulture);

[Fact]
public void GetString_En()
{
TestGetString("Hello World", "Hello", _en);
}
public void GetString_En() => TestGetString("Hello World", "Hello", _en);

[Fact]
public void GetString_Fi()
{
TestGetString("Hei maailma", "Hello", _fi);
}
public void GetString_Fi() => TestGetString("Hei maailma", "Hello", _fi);

[Fact]
public void GetString_Null()
{
public void GetString_Null() =>
this.Invoking(self => self.Translate(null!, _en))
.Should().Throw<ArgumentException>();
}
.Should().Throw<ArgumentException>();

[Fact]
public void GetString_Missing()
{
Translate("Missing", _en).ResourceNotFound.Should().BeTrue();
}
public void GetString_Missing() => Translate("Missing", _en).ResourceNotFound.Should().BeTrue();

[Fact]
public void GetString_Typed()
Expand All @@ -82,16 +68,12 @@ public void GetString_Typed()
}

[Fact]
public void GetString_Param()
{
public void GetString_Param() =>
TestGetString("Hello Mike", "HelloName", new[] { "Mike" }, CultureInfo.InvariantCulture);
}

[Fact]
public void GetString_Param_Fi()
{
public void GetString_Param_Fi() =>
TestGetString("Hei, Mike", "HelloName", new[] { "Mike" }, _fi);
}
}

class MyClass
Expand Down

0 comments on commit 6da1544

Please sign in to comment.