From 48c0e27cc5203f8770f29b0a21b4af4e88f35e7d Mon Sep 17 00:00:00 2001 From: p6laris Date: Wed, 13 Nov 2024 06:14:08 +0300 Subject: [PATCH] Fact methods need to be async --- MorseTest/MorseAudioAndLightConverters.cs | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/MorseTest/MorseAudioAndLightConverters.cs b/MorseTest/MorseAudioAndLightConverters.cs index a042a6d..7640275 100644 --- a/MorseTest/MorseAudioAndLightConverters.cs +++ b/MorseTest/MorseAudioAndLightConverters.cs @@ -103,11 +103,11 @@ public void ConvertToLight() Assert.True(blinkValues.Count > 0); } [Fact] - public void ConvertToLightWithNull() + public async Task ConvertToLightWithNull() { - Assert.Throws(() => + await Assert.ThrowsAsync(async () => { - Morse.GetConverter() + await Morse.GetConverter() .ForLanguage(Language.English) .ToMorse(null) .ToLight() @@ -119,11 +119,11 @@ public void ConvertToLightWithNull() } [Fact] - public void ConvertToLightWithSmallerCharSpeed() + public async Task ConvertToLightWithSmallerCharSpeed() { - Assert.Throws(() => + await Assert.ThrowsAsync(async () => { - Morse.GetConverter() + await Morse.GetConverter() .ForLanguage(Language.English) .ToMorse("Hi") .ToLight() @@ -135,11 +135,11 @@ public void ConvertToLightWithSmallerCharSpeed() } [Fact] - public void ConvertToLightWithoutConversionNull() + public async Task ConvertToLightWithoutConversionNull() { - Assert.Throws(() => + await Assert.ThrowsAsync(async () => { - Morse.GetConverter() + await Morse.GetConverter() .ForLanguage(Language.English) .ToLight(null) .SetBlinkerOptions(25, 25) @@ -150,11 +150,11 @@ public void ConvertToLightWithoutConversionNull() } [Fact] - public void ConvertToLightWithoutConversionSmallerCharSpeed() + public async Task ConvertToLightWithoutConversionSmallerCharSpeed() { - Assert.Throws(() => + await Assert.ThrowsAsync(async () => { - Morse.GetConverter() + await Morse.GetConverter() .ForLanguage(Language.English) .ToLight(".... ..") .SetBlinkerOptions(20, 25)