Skip to content

Commit

Permalink
Fact methods need to be async
Browse files Browse the repository at this point in the history
  • Loading branch information
p6laris committed Nov 13, 2024
1 parent c83d0aa commit 48c0e27
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions MorseTest/MorseAudioAndLightConverters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ public void ConvertToLight()
Assert.True(blinkValues.Count > 0);
}
[Fact]
public void ConvertToLightWithNull()
public async Task ConvertToLightWithNull()
{
Assert.Throws<ArgumentNullException>(() =>
await Assert.ThrowsAsync<ArgumentNullException>(async () =>
{
Morse.GetConverter()
await Morse.GetConverter()
.ForLanguage(Language.English)
.ToMorse(null)
.ToLight()
Expand All @@ -119,11 +119,11 @@ public void ConvertToLightWithNull()

}
[Fact]
public void ConvertToLightWithSmallerCharSpeed()
public async Task ConvertToLightWithSmallerCharSpeed()
{
Assert.Throws<SmallerCharSpeedException>(() =>
await Assert.ThrowsAsync<SmallerCharSpeedException>(async () =>
{
Morse.GetConverter()
await Morse.GetConverter()
.ForLanguage(Language.English)
.ToMorse("Hi")
.ToLight()
Expand All @@ -135,11 +135,11 @@ public void ConvertToLightWithSmallerCharSpeed()

}
[Fact]
public void ConvertToLightWithoutConversionNull()
public async Task ConvertToLightWithoutConversionNull()
{
Assert.Throws<ArgumentNullException>(() =>
await Assert.ThrowsAsync<ArgumentNullException>(async () =>
{
Morse.GetConverter()
await Morse.GetConverter()
.ForLanguage(Language.English)
.ToLight(null)
.SetBlinkerOptions(25, 25)
Expand All @@ -150,11 +150,11 @@ public void ConvertToLightWithoutConversionNull()

}
[Fact]
public void ConvertToLightWithoutConversionSmallerCharSpeed()
public async Task ConvertToLightWithoutConversionSmallerCharSpeed()
{
Assert.Throws<SmallerCharSpeedException>(() =>
await Assert.ThrowsAsync<SmallerCharSpeedException>(async () =>
{
Morse.GetConverter()
await Morse.GetConverter()
.ForLanguage(Language.English)
.ToLight(".... ..")
.SetBlinkerOptions(20, 25)
Expand Down

0 comments on commit 48c0e27

Please sign in to comment.