diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 64db9d16a..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: 'Run App , ' - -on: [push, pull_request] - -jobs: - build-and-test: - runs-on: ubuntu-latest - steps: - - run: echo "Hello, World!" diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml new file mode 100644 index 000000000..992a4f661 --- /dev/null +++ b/.github/workflows/run-app.yaml @@ -0,0 +1,17 @@ +name: 'Run App Nachi, Aidan' + +on: [push, pull_request] + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - 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 \ No newline at end of file diff --git a/Console/Program.cs b/Console/Program.cs index 56bb86061..c1a90c5eb 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) + public static double Power(string baseNum, string exponent) { - return 0.0; + return Math.Pow(double.Parse(baseNum), double.Parse(exponent)); } } diff --git a/Tests/UnitTests.cs b/Tests/UnitTests.cs index a2d3bd18e..e98ccd3ce 100644 --- a/Tests/UnitTests.cs +++ b/Tests/UnitTests.cs @@ -4,7 +4,7 @@ namespace GithubActionsLab; public class Addition { [TestMethod] - public void Add_Valid_Patino() + public void Add_Valid_Patino_Nachi() { Assert.AreEqual(3, Program.Add("1", "2")); Assert.AreEqual(5, Program.Add("3", "2")); @@ -12,7 +12,7 @@ public void Add_Valid_Patino() } [TestMethod] - public void Add_Invalid_Patino() + public void Add_Invalid_Patino_Nachi() { Assert.ThrowsException(() => Program.Add("1", "a")); Assert.ThrowsException(() => Program.Add("a", "1")); @@ -20,7 +20,7 @@ public void Add_Invalid_Patino() } [TestMethod] - public void Add_Null_Patino() + public void Add_Null_Patino_Nachi() { Assert.ThrowsException(() => Program.Add("1", null)); Assert.ThrowsException(() => Program.Add(null, "1"));