From 6acd8c8ff1bc683679a4bc7f0fa55cfc882f7776 Mon Sep 17 00:00:00 2001 From: didier amyot Date: Thu, 24 Aug 2023 09:55:07 -0400 Subject: [PATCH] added test --- .vscode/settings.json | 4 ++-- Algorithms.Tests/IdCard/NameTest.cs | 16 ++++++++++++++++ Algorithms.Tests/UnitTest1.cs | 8 +++++++- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 Algorithms.Tests/IdCard/NameTest.cs diff --git a/.vscode/settings.json b/.vscode/settings.json index c018fd8..47cf5cd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,8 @@ { "dotnet.defaultSolution": "FirstProject.sln", - "editor.fontSize": 12, + "editor.fontSize": 22, "window.zoomLevel": 1, - "terminal.integrated.fontSize": 12, + "terminal.integrated.fontSize": 22, "workbench.tree.indent": 23 } \ No newline at end of file diff --git a/Algorithms.Tests/IdCard/NameTest.cs b/Algorithms.Tests/IdCard/NameTest.cs new file mode 100644 index 0000000..a4549e4 --- /dev/null +++ b/Algorithms.Tests/IdCard/NameTest.cs @@ -0,0 +1,16 @@ +using Algorithms.IdCard; + +namespace Algorithms.Tests.IdCard; + + + +[TestClass] +public class NameTest +{ + [TestMethod] + public void TestIsValid() + { + Assert.IsFalse(new Name("", "").IsValid()); + Assert.IsFalse(new Name("bob", "r2d2").IsValid()); + } +} \ No newline at end of file diff --git a/Algorithms.Tests/UnitTest1.cs b/Algorithms.Tests/UnitTest1.cs index 125c17a..f1ef7bc 100644 --- a/Algorithms.Tests/UnitTest1.cs +++ b/Algorithms.Tests/UnitTest1.cs @@ -4,7 +4,13 @@ namespace Algorithms.Tests; public class UnitTest1 { [TestMethod] - public void TestMethod1() + public void TestQuiPasse() { + Assert.AreEqual(1+ 1, 2); + } + [TestMethod] + public void TestQuiNePassePas() + { + Assert.AreEqual(2, 1 + 1); } } \ No newline at end of file