From c9ca856d8f76d3b4c86532defa04d47c0d0a17f2 Mon Sep 17 00:00:00 2001 From: Serghei Cebotari Date: Wed, 9 Aug 2023 09:42:50 +0300 Subject: Simple task --- Codeforces.Test/Tests.cs | 40 ++++++++++++++++++++++++++++++++++++++++ Codeforces.Test/UnitTest1.cs | 10 ---------- Codeforces.Test/Usings.cs | 3 ++- 3 files changed, 42 insertions(+), 11 deletions(-) create mode 100644 Codeforces.Test/Tests.cs delete mode 100644 Codeforces.Test/UnitTest1.cs (limited to 'Codeforces.Test') diff --git a/Codeforces.Test/Tests.cs b/Codeforces.Test/Tests.cs new file mode 100644 index 0000000..db4dace --- /dev/null +++ b/Codeforces.Test/Tests.cs @@ -0,0 +1,40 @@ +namespace Codeforces.Test; + +public class Tests +{ + [Fact] + public void TestIO() + { + IOTester.Start(); + + string[] input = new string[] + { + "5", + "256 42", + "1000 1000", + "-1000 1000", + "-1000 1000", + "20 22" + }; + IOTester.SetInput(input); + + Program.Main(new string[0]); + + string[] output = new string[] + { + "298", + "2000", + "0", + "0", + "42" + }; + + string[] actualOutput = IOTester.GetOutputLines(); + Assert.Equal(output.Length, actualOutput.Length - 1); + for (int i = 0; i< output.Length; i++) + { + Assert.Equal(output[i], actualOutput[i]); + } + } + +} \ No newline at end of file diff --git a/Codeforces.Test/UnitTest1.cs b/Codeforces.Test/UnitTest1.cs deleted file mode 100644 index 8f7b9b7..0000000 --- a/Codeforces.Test/UnitTest1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Codeforces.Test; - -public class UnitTest1 -{ - [Fact] - public void Test1() - { - - } -} \ No newline at end of file diff --git a/Codeforces.Test/Usings.cs b/Codeforces.Test/Usings.cs index 8c927eb..c1ede49 100644 --- a/Codeforces.Test/Usings.cs +++ b/Codeforces.Test/Usings.cs @@ -1 +1,2 @@ -global using Xunit; \ No newline at end of file +global using Xunit; +global using Codeforces; \ No newline at end of file -- cgit v1.2.3