From 9083ee6a7a66015f4a970e148f216f4e70984a49 Mon Sep 17 00:00:00 2001 From: GavinO0745 Date: Wed, 25 Mar 2026 15:39:58 -0500 Subject: [PATCH 1/9] Update ci.yml --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64db9d16..50915586 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: 'Run App , ' +name: 'Run App Olsen, Gavin' on: [push, pull_request] @@ -6,4 +6,12 @@ jobs: build-and-test: runs-on: ubuntu-latest steps: - - run: echo "Hello, World!" + - uses: actions/checkout@v2 + - name: install dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.x' + - name: build + run: dotnet build + - name: run unit tests + run: dotnet test From 470f0fbfb4dad1d64b8d1c5a3a4f52b8828c8e20 Mon Sep 17 00:00:00 2001 From: GavinO0745 Date: Wed, 25 Mar 2026 15:43:53 -0500 Subject: [PATCH 2/9] Update ci.yml --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64db9d16..50915586 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: 'Run App , ' +name: 'Run App Olsen, Gavin' on: [push, pull_request] @@ -6,4 +6,12 @@ jobs: build-and-test: runs-on: ubuntu-latest steps: - - run: echo "Hello, World!" + - uses: actions/checkout@v2 + - name: install dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.x' + - name: build + run: dotnet build + - name: run unit tests + run: dotnet test From f095e43cf45f9a6aa42352f6602f574da80fbc10 Mon Sep 17 00:00:00 2001 From: GavinO0745 Date: Wed, 25 Mar 2026 15:44:36 -0500 Subject: [PATCH 3/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7400b87d..2d9b72a6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Run App](https://github.com/kgerot/GithubActions/actions/workflows/run-app.yaml/badge.svg)](https://github.com/kgerot/GithubActions/actions/workflows/run-app.yaml) # Do not submit a pull request to `kgerot/GithubActions` or `dteske/TraviCI`. Not following this instruction can ruin the lab for others, so pay attention. - +. I receive around 60 pull requests every semester and have to manually delete each request and action run. Your actions will automatically fail if you open a pull request # Github Actions Lab From 0dc56351af782979059f45ff189199a57f86e89b Mon Sep 17 00:00:00 2001 From: GavinO0745 Date: Wed, 25 Mar 2026 15:47:43 -0500 Subject: [PATCH 4/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d9b72a6..5c68633d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Run App](https://github.com/kgerot/GithubActions/actions/workflows/run-app.yaml/badge.svg)](https://github.com/kgerot/GithubActions/actions/workflows/run-app.yaml) +image # Do not submit a pull request to `kgerot/GithubActions` or `dteske/TraviCI`. Not following this instruction can ruin the lab for others, so pay attention. . From 5bc3c05312cd07f985c194d867328d08e72292a5 Mon Sep 17 00:00:00 2001 From: GavinO0745 Date: Wed, 25 Mar 2026 15:48:29 -0500 Subject: [PATCH 5/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c68633d..0c46c7b9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -image +[![Run App Olsen, Gavin](https://github.com/GavinO0745/GithubActions/actions/workflows/ci.yml/badge.svg)](https://github.com/GavinO0745/GithubActions/actions/workflows/ci.yml) # Do not submit a pull request to `kgerot/GithubActions` or `dteske/TraviCI`. Not following this instruction can ruin the lab for others, so pay attention. . From cd58a8e4b1e3ba1abb695c09fa8878f893ae0716 Mon Sep 17 00:00:00 2001 From: GavinO0745 Date: Wed, 25 Mar 2026 15:58:36 -0500 Subject: [PATCH 6/9] Update UnitTests.cs --- Tests/UnitTests.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Tests/UnitTests.cs b/Tests/UnitTests.cs index a2d3bd18..7e9102a7 100644 --- a/Tests/UnitTests.cs +++ b/Tests/UnitTests.cs @@ -26,4 +26,32 @@ public void Add_Null_Patino() Assert.ThrowsException(() => Program.Add(null, "1")); Assert.ThrowsException(() => Program.Add(null, null)); } + + [TestMethod] +public void Subtract_Valid() +{ + Assert.AreEqual(1, Program.Subtract("3", "2")); + Assert.AreEqual(0, Program.Subtract("2", "2")); +} + +[TestMethod] +public void Multiply_Valid() +{ + Assert.AreEqual(6, Program.Multiply("2", "3")); + Assert.AreEqual(10, Program.Multiply("5", "2")); +} + +[TestMethod] +public void Divide_Valid() +{ + Assert.AreEqual(2, Program.Divide("6", "3")); + Assert.AreEqual(5, Program.Divide("10", "2")); +} + +[TestMethod] +public void Power_Valid() +{ + Assert.AreEqual(8, Program.Power("2", "3")); + Assert.AreEqual(9, Program.Power("3", "2")); +} } From 80a97d696f169b384ef93d9faea60379cba01e9f Mon Sep 17 00:00:00 2001 From: GavinO0745 Date: Wed, 25 Mar 2026 16:03:20 -0500 Subject: [PATCH 7/9] Update UnitTests.cs --- Tests/UnitTests.cs | 90 +++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/Tests/UnitTests.cs b/Tests/UnitTests.cs index 7e9102a7..07cb50c4 100644 --- a/Tests/UnitTests.cs +++ b/Tests/UnitTests.cs @@ -3,55 +3,55 @@ namespace GithubActionsLab; [TestClass] public class Addition { - [TestMethod] - public void Add_Valid_Patino() - { - Assert.AreEqual(3, Program.Add("1", "2")); - Assert.AreEqual(5, Program.Add("3", "2")); - Assert.AreEqual(12, Program.Add("5", "7")); - } + [TestMethod] + public void Add_Valid_Patino() + { + Assert.AreEqual(3, Program.Add("1", "2")); + Assert.AreEqual(5, Program.Add("3", "2")); + Assert.AreEqual(12, Program.Add("5", "7")); + } - [TestMethod] - public void Add_Invalid_Patino() - { - Assert.ThrowsException(() => Program.Add("1", "a")); - Assert.ThrowsException(() => Program.Add("a", "1")); - Assert.ThrowsException(() => Program.Add("a", "a")); - } + [TestMethod] + public void Add_Invalid_Patino() + { + Assert.ThrowsException(() => Program.Add("1", "a")); + Assert.ThrowsException(() => Program.Add("a", "1")); + Assert.ThrowsException(() => Program.Add("a", "a")); + } - [TestMethod] - public void Add_Null_Patino() - { - Assert.ThrowsException(() => Program.Add("1", null)); - Assert.ThrowsException(() => Program.Add(null, "1")); - Assert.ThrowsException(() => Program.Add(null, null)); - } + [TestMethod] + public void Add_Null_Patino() + { + Assert.ThrowsException(() => Program.Add("1", null)); + Assert.ThrowsException(() => Program.Add(null, "1")); + Assert.ThrowsException(() => Program.Add(null, null)); + } - [TestMethod] -public void Subtract_Valid() -{ - Assert.AreEqual(1, Program.Subtract("3", "2")); - Assert.AreEqual(0, Program.Subtract("2", "2")); -} + [TestMethod] + public void Subtract_Valid() + { + Assert.AreEqual(1, Program.Subtract("3", "2")); + Assert.AreEqual(0, Program.Subtract("2", "2")); + } -[TestMethod] -public void Multiply_Valid() -{ - Assert.AreEqual(6, Program.Multiply("2", "3")); - Assert.AreEqual(10, Program.Multiply("5", "2")); -} + [TestMethod] + public void Multiply_Valid() + { + Assert.AreEqual(6, Program.Multiply("2", "3")); + Assert.AreEqual(10, Program.Multiply("5", "2")); // ✅ FIXED + } -[TestMethod] -public void Divide_Valid() -{ - Assert.AreEqual(2, Program.Divide("6", "3")); - Assert.AreEqual(5, Program.Divide("10", "2")); -} + [TestMethod] + public void Divide_Valid() + { + Assert.AreEqual(2, Program.Divide("6", "3")); + Assert.AreEqual(5, Program.Divide("10", "2")); + } -[TestMethod] -public void Power_Valid() -{ - Assert.AreEqual(8, Program.Power("2", "3")); - Assert.AreEqual(9, Program.Power("3", "2")); -} + [TestMethod] + public void Power_Valid() + { + Assert.AreEqual(8, Program.Power("2", "3")); + Assert.AreEqual(9, Program.Power("3", "2")); + } } From 4402f32ef82d1bae6cc291ded5710f8266f787a2 Mon Sep 17 00:00:00 2001 From: GavinO0745 Date: Wed, 25 Mar 2026 16:06:08 -0500 Subject: [PATCH 8/9] Update Program.cs --- Console/Program.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Console/Program.cs b/Console/Program.cs index 56bb8606..cc378e46 100644 --- a/Console/Program.cs +++ b/Console/Program.cs @@ -84,8 +84,8 @@ public static double Divide(string x, string y) } // Implement this method following a similar pattern as above - public static double Power(string x, string y) - { - return 0.0; - } +public static double Power(string x, string y) +{ + return Math.Pow(double.Parse(x), double.Parse(y)); +} } From 909207af079e1b7da719a1ed76b0233e0872f7ae Mon Sep 17 00:00:00 2001 From: GavinO0745 Date: Wed, 25 Mar 2026 16:07:03 -0500 Subject: [PATCH 9/9] Update UnitTests.cs --- Tests/UnitTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/UnitTests.cs b/Tests/UnitTests.cs index 07cb50c4..ee35a3c5 100644 --- a/Tests/UnitTests.cs +++ b/Tests/UnitTests.cs @@ -1,5 +1,5 @@ namespace GithubActionsLab; - +// [TestClass] public class Addition {