From 7986ee1b60dcd6bf645dfb84272b887faa0aafb8 Mon Sep 17 00:00:00 2001 From: Arthur Spears Date: Wed, 17 Apr 2024 19:27:26 -0700 Subject: Added second unit tests project as example. --- CST 126/UnitTest2/UnitTest2.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 CST 126/UnitTest2/UnitTest2.cpp (limited to 'CST 126/UnitTest2/UnitTest2.cpp') diff --git a/CST 126/UnitTest2/UnitTest2.cpp b/CST 126/UnitTest2/UnitTest2.cpp new file mode 100644 index 0000000..825629a --- /dev/null +++ b/CST 126/UnitTest2/UnitTest2.cpp @@ -0,0 +1,35 @@ +#include "pch.h" +#include "CppUnitTest.h" + +#include "helpers.hpp" + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace UnitTest2 +{ + TEST_CLASS(Add_Function_Overloads) + { + public: + + TEST_METHOD(Addition_Function_Overload00_Correctly) + { + //Arrange + + //Act + int result = add(15, 15, 15); + + //Assert + Assert::AreEqual(45, result); + } + TEST_METHOD(Addition_Function_Overload01_Correctly) + { + //Arrange + + //Act + int result = add(15, 15, 15, 15); + + //Assert + Assert::AreEqual(60, result); + } + }; +} -- cgit v1.2.3