aboutsummaryrefslogtreecommitdiff
path: root/CST 126/UnitTest2/UnitTest2.cpp
diff options
context:
space:
mode:
authorarthurtspears <[email protected]>2024-04-20 11:16:36 -0700
committerGitHub <[email protected]>2024-04-20 11:16:36 -0700
commit659a1f12d935130bf8da4fe14165e4f421ac7c18 (patch)
treecebf8ee2c18c8e0aa4cf5fc4630a8005164b068d /CST 126/UnitTest2/UnitTest2.cpp
parentAdded helpers.h file. (diff)
downloadhomework-1-arthurtspears-develop.tar.xz
homework-1-arthurtspears-develop.zip
Adding basic unit tests to Solution (#2)HEADdevelop
* all work up until inclass practice * Added Unit Tests Project * Added second unit tests project as example. * Bring up to date for merge
Diffstat (limited to 'CST 126/UnitTest2/UnitTest2.cpp')
-rw-r--r--CST 126/UnitTest2/UnitTest2.cpp35
1 files changed, 35 insertions, 0 deletions
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);
+ }
+ };
+}