diff --git a/.vs/c-sharp/v17/.suo b/.vs/c-sharp/v17/.suo index 07d5efd..7d2e3dd 100644 Binary files a/.vs/c-sharp/v17/.suo and b/.vs/c-sharp/v17/.suo differ diff --git a/.vs/c-sharp/v17/TestStore/0/000.testlog b/.vs/c-sharp/v17/TestStore/0/000.testlog index c969730..d4a89d7 100644 Binary files a/.vs/c-sharp/v17/TestStore/0/000.testlog and b/.vs/c-sharp/v17/TestStore/0/000.testlog differ diff --git a/Negyszog/Negyszog.cs b/Negyszog/Negyszog.cs index b5f233e..60c3f09 100644 --- a/Negyszog/Negyszog.cs +++ b/Negyszog/Negyszog.cs @@ -7,11 +7,20 @@ using System.Threading.Tasks; namespace Negyszog { public class Negyszog { public double oldal { get; set; } + public double oszlop; public Negyszog(double oldal) { this.oldal = oldal; } + public void getOszlop(double oszlop) { + if(oszlop <= 0) { + throw new ArgumentException("A magasság negativ!"); + } else { + this.oszlop = oszlop; + } + } + public double Kerulet() { return 4.0 * oldal; } diff --git a/Negyszog/bin/Debug/Negyszog.exe b/Negyszog/bin/Debug/Negyszog.exe index ecb82db..bd29788 100644 Binary files a/Negyszog/bin/Debug/Negyszog.exe and b/Negyszog/bin/Debug/Negyszog.exe differ diff --git a/Negyszog/bin/Debug/Negyszog.pdb b/Negyszog/bin/Debug/Negyszog.pdb index 1670602..fee321c 100644 Binary files a/Negyszog/bin/Debug/Negyszog.pdb and b/Negyszog/bin/Debug/Negyszog.pdb differ diff --git a/Negyszog/obj/Debug/Negyszog.exe b/Negyszog/obj/Debug/Negyszog.exe index ecb82db..bd29788 100644 Binary files a/Negyszog/obj/Debug/Negyszog.exe and b/Negyszog/obj/Debug/Negyszog.exe differ diff --git a/Negyszog/obj/Debug/Negyszog.pdb b/Negyszog/obj/Debug/Negyszog.pdb index 1670602..fee321c 100644 Binary files a/Negyszog/obj/Debug/Negyszog.pdb and b/Negyszog/obj/Debug/Negyszog.pdb differ diff --git a/NegyszogUnitTest/UnitTest1.cs b/NegyszogUnitTest/UnitTest1.cs index e9c2531..9868fce 100644 --- a/NegyszogUnitTest/UnitTest1.cs +++ b/NegyszogUnitTest/UnitTest1.cs @@ -27,5 +27,12 @@ namespace NegyszogUnitTest { double kapotEredmeny = negyszog.Atlo(); Assert.AreEqual(vartEredmeny, kapotEredmeny); } + + [TestMethod, ExpectedException(typeof(ArgumentException))] + public void TestGetOszlop() { + double m = 1; + negyszog.getOszlop(m); + //Assert.Fail(); + } } } diff --git a/NegyszogUnitTest/bin/Debug/Negyszog.exe b/NegyszogUnitTest/bin/Debug/Negyszog.exe index ecb82db..bd29788 100644 Binary files a/NegyszogUnitTest/bin/Debug/Negyszog.exe and b/NegyszogUnitTest/bin/Debug/Negyszog.exe differ diff --git a/NegyszogUnitTest/bin/Debug/Negyszog.pdb b/NegyszogUnitTest/bin/Debug/Negyszog.pdb index 1670602..fee321c 100644 Binary files a/NegyszogUnitTest/bin/Debug/Negyszog.pdb and b/NegyszogUnitTest/bin/Debug/Negyszog.pdb differ diff --git a/NegyszogUnitTest/bin/Debug/NegyszogUnitTest.dll b/NegyszogUnitTest/bin/Debug/NegyszogUnitTest.dll index 36963b8..db9b855 100644 Binary files a/NegyszogUnitTest/bin/Debug/NegyszogUnitTest.dll and b/NegyszogUnitTest/bin/Debug/NegyszogUnitTest.dll differ diff --git a/NegyszogUnitTest/bin/Debug/NegyszogUnitTest.pdb b/NegyszogUnitTest/bin/Debug/NegyszogUnitTest.pdb index 4f47c03..52eb6ee 100644 Binary files a/NegyszogUnitTest/bin/Debug/NegyszogUnitTest.pdb and b/NegyszogUnitTest/bin/Debug/NegyszogUnitTest.pdb differ diff --git a/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.csproj.AssemblyReference.cache b/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.csproj.AssemblyReference.cache index d6092c5..23fed3d 100644 Binary files a/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.csproj.AssemblyReference.cache and b/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.csproj.AssemblyReference.cache differ diff --git a/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.dll b/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.dll index 36963b8..db9b855 100644 Binary files a/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.dll and b/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.dll differ diff --git a/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.pdb b/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.pdb index 4f47c03..52eb6ee 100644 Binary files a/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.pdb and b/NegyszogUnitTest/obj/Debug/NegyszogUnitTest.pdb differ diff --git a/csv/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/csv/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 4e47157..58bd243 100644 Binary files a/csv/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/csv/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/csv/obj/Debug/csv.csproj.AssemblyReference.cache b/csv/obj/Debug/csv.csproj.AssemblyReference.cache index a93305f..6943b8f 100644 Binary files a/csv/obj/Debug/csv.csproj.AssemblyReference.cache and b/csv/obj/Debug/csv.csproj.AssemblyReference.cache differ