diff --git a/00_Common/dotnet/Games.Common.Test/IO/TokenReaderTests.cs b/00_Common/dotnet/Games.Common.Test/IO/TokenReaderTests.cs index 3a4b9e9b..65b33908 100644 --- a/00_Common/dotnet/Games.Common.Test/IO/TokenReaderTests.cs +++ b/00_Common/dotnet/Games.Common.Test/IO/TokenReaderTests.cs @@ -6,14 +6,12 @@ using FluentAssertions.Execution; using Xunit; using static System.Environment; +using static Games.Common.IO.Strings; namespace Games.Common.IO { public class TokenReaderTests { - const string NumberExpected = "!Number expected - retry input line"; - const string ExtraInput = "!Extra input ignored"; - private readonly StringWriter _outputWriter; public TokenReaderTests() diff --git a/00_Common/dotnet/Games.Common/IO/Strings.cs b/00_Common/dotnet/Games.Common/IO/Strings.cs new file mode 100644 index 00000000..3d955409 --- /dev/null +++ b/00_Common/dotnet/Games.Common/IO/Strings.cs @@ -0,0 +1,8 @@ +namespace Games.Common.IO +{ + internal static class Strings + { + internal const string NumberExpected = "!Number expected - retry input line"; + internal const string ExtraInput = "!Extra input ignored"; + } +} \ No newline at end of file diff --git a/00_Common/dotnet/Games.Common/IO/TokenReader.cs b/00_Common/dotnet/Games.Common/IO/TokenReader.cs index f2046dc3..b7eb3774 100644 --- a/00_Common/dotnet/Games.Common/IO/TokenReader.cs +++ b/00_Common/dotnet/Games.Common/IO/TokenReader.cs @@ -1,13 +1,12 @@ using System; using System.Collections.Generic; +using static Games.Common.IO.Strings; + namespace Games.Common.IO { internal class TokenReader { - private const string NumberExpected = "!Number expected - retry input line"; - private const string ExtraInput = "!Extra input ignored"; - private readonly TextIO _io; private readonly Predicate _isTokenValid;