diff --git a/src/AIAssist/AIAssist.nuspec b/src/AIAssist/AIAssist.nuspec index 6089a18..6ce5b96 100644 --- a/src/AIAssist/AIAssist.nuspec +++ b/src/AIAssist/AIAssist.nuspec @@ -7,9 +7,6 @@ - - - AIAssist AIAssist diff --git a/tests/UnitTests/BuildingBlocks.UnitTests/BuildingBlocks.UnitTests.csproj b/tests/UnitTests/BuildingBlocks.UnitTests/BuildingBlocks.UnitTests.csproj index 96cddbf..8b9e4bb 100644 --- a/tests/UnitTests/BuildingBlocks.UnitTests/BuildingBlocks.UnitTests.csproj +++ b/tests/UnitTests/BuildingBlocks.UnitTests/BuildingBlocks.UnitTests.csproj @@ -12,50 +12,4 @@ - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - diff --git a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Calculator.csproj b/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Calculator.csproj deleted file mode 100644 index 2150e37..0000000 --- a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Calculator.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net8.0 - enable - enable - - - diff --git a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/IOperation.cs b/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/IOperation.cs deleted file mode 100644 index 81e3384..0000000 --- a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/IOperation.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace BuildingBlocks.UnitTests.TestData.Calculator; - -public interface IOperation -{ - double Calculate(); -} diff --git a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Add.cs b/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Add.cs deleted file mode 100644 index 568b0f4..0000000 --- a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Add.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace BuildingBlocks.UnitTests.TestData.Calculator.Models; - -/// -/// Add two value -/// -/// -/// -public class Add(double number1, double number2) : IOperation -{ - public double Calculate() - { - return AddNumbers(); - } - - private double AddNumbers() - { - return number1 / number2; - } -} diff --git a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Divide.cs b/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Divide.cs deleted file mode 100644 index 1f2f8c1..0000000 --- a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Divide.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace BuildingBlocks.UnitTests.TestData.Calculator.Models; - -/// -/// Divide to values -/// -/// -/// -public class Divide(double number1, double number2) : IOperation -{ - public double Calculate() - { - return DivideNumbers(); - } - - private double DivideNumbers() - { - if (number1 == 0) - { - throw new DivideByZeroException("Cannot divide by zero."); - } - return number1 / number2; - } -} diff --git a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Multiply.cs b/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Multiply.cs deleted file mode 100644 index 1795772..0000000 --- a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Multiply.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace BuildingBlocks.UnitTests.TestData.Calculator.Models; - -/// -/// Multiply two values -/// -/// -/// -public class Multiply(double number1, double number2) : IOperation -{ - public double Calculate() - { - return number1 * number2; - } -} diff --git a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Subtract.cs b/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Subtract.cs deleted file mode 100644 index 871d99e..0000000 --- a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Models/Subtract.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace BuildingBlocks.UnitTests.TestData.Calculator.Models; - -/// -/// Subtract two values -/// -/// -/// -public class Subtract(double number1, double number2) : IOperation -{ - public double Calculate() - { - return number1 - number2; - } -} diff --git a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Program.cs b/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Program.cs deleted file mode 100644 index 23bfea6..0000000 --- a/tests/UnitTests/BuildingBlocks.UnitTests/TestData/Calculator/Program.cs +++ /dev/null @@ -1,28 +0,0 @@ -using BuildingBlocks.UnitTests.TestData.Calculator; -using BuildingBlocks.UnitTests.TestData.Calculator.Models; - -Console.WriteLine("Simple Calculator\n"); - -// Input first number -Console.Write("Enter the first number: "); -double num1 = Convert.ToDouble(Console.ReadLine()); - -// Input operator -Console.Write("Enter an operation (+, -, *, /): "); -char operation = Convert.ToChar(Console.ReadLine()); - -// Input second number -Console.Write("Enter the second number: "); -double num2 = Convert.ToDouble(Console.ReadLine()); - -IOperation calculation = operation switch -{ - '+' => new Add(num1, num2), - '-' => new Subtract(num1, num2), - '*' => new Multiply(num1, num2), - '/' => new Divide(num1, num2), - _ => throw new InvalidOperationException("Invalid operation"), -}; - -double result = calculation.Calculate(); -Console.WriteLine($"Result: {result}");