This commit is contained in:
2022-05-31 09:44:01 +02:00
parent 11972339b5
commit 90a869e261
183 changed files with 201479 additions and 32 deletions

Binary file not shown.

View File

@@ -2,17 +2,17 @@
using System; using System;
namespace CalculatorTest namespace CalculatorTest
{ {
[TestClass] [TestClass]
public class UnitTest1 public class UnitTest1
{ {
static int s = 4; calculator.Kalkulatorr calc = new calculator.Kalkulatorr(5,5,'+');
calculator.Kalkulatorr cal = new calculator.Kalkulatorr();
[TestMethod] [TestMethod]
public void Testosszead() public void Testosszead()
{ {
int vart = 8; int vart = 10;
int kapott = cal.kiir(); int kapott = calc.szamolas();
Assert.AreEqual(vart, kapott); Assert.AreEqual(vart, kapott);
} }
} }

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

Binary file not shown.

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

View File

@@ -0,0 +1 @@
79f47fbdd47486acebbb8b13e5f238bbd9b4dd77

View File

@@ -0,0 +1,17 @@
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\CalculatorTest.dll
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\CalculatorTest.pdb
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\calculator.exe
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\calculator.pdb
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\calculator.exe.config
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.xml
C:\dev\c#\c-sharp\CalculatorTest\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
C:\dev\c#\c-sharp\CalculatorTest\obj\Debug\CalculatorTest.csproj.AssemblyReference.cache
C:\dev\c#\c-sharp\CalculatorTest\obj\Debug\CalculatorTest.csproj.CoreCompileInputs.cache
C:\dev\c#\c-sharp\CalculatorTest\obj\Debug\CalculatorTest.csproj.CopyComplete
C:\dev\c#\c-sharp\CalculatorTest\obj\Debug\CalculatorTest.dll
C:\dev\c#\c-sharp\CalculatorTest\obj\Debug\CalculatorTest.pdb

Binary file not shown.

Binary file not shown.

View File

@@ -6,13 +6,14 @@ using System.Threading.Tasks;
namespace calculator namespace calculator
{ {
class Program public class Program
{ {
static void Main(string[] args) public static void Main(string[] args)
{ {
Kalkulatorr cal = new Kalkulatorr(); Kalkulatorr cal = new Kalkulatorr(5,5,'+');
cal.beker(); //cal.beker();
cal.kiir(); Console.WriteLine(cal.szamolas());
Console.ReadKey();
} }
} }
} }

Binary file not shown.

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

Binary file not shown.

View File

@@ -7,41 +7,33 @@ using System.Threading.Tasks;
namespace calculator namespace calculator
{ {
public class Kalkulatorr public class Kalkulatorr
{ {
private int szam1 = 0; private int szam1 = 0;
private int szam2 = 0; private int szam2 = 0;
private char muvjel; private char muvjel;
private int eredm = 0; private int eredm = 0;
private string uzen = "A művelet eredménye: "; private string uzen;
public Kalkulatorr() public Kalkulatorr(int szam1, int szam2, char muvjel)
{
}
public Kalkulatorr(int szam1, int szam2, char muvjel, int eredm, string uzen)
{ {
this.szam1 = szam1; this.szam1 = szam1;
this.szam2 = szam2; this.szam2 = szam2;
this.muvjel = muvjel; this.muvjel = muvjel;
this.eredm = eredm;
this.uzen = uzen;
} }
public void beker() public void beker()
{ {
Console.WriteLine("Adja meg az első számot"); Console.WriteLine("Adja meg az első számot");
szam1 = 4; //int.Parse(Console.ReadLine()); szam1 = int.Parse(Console.ReadLine());
Console.WriteLine("Adja meg a második számot"); Console.WriteLine("Adja meg a második számot");
szam2 = 4; //int.Parse(Console.ReadLine()); szam2 = int.Parse(Console.ReadLine());
Console.WriteLine("Adja meg a műveleti jelet"); Console.WriteLine("Adja meg a műveleti jelet");
muvjel = '+'; //Convert.ToChar(Console.Read()); muvjel = Convert.ToChar(Console.Read());
} }
public int kiir()
public int szamolas()
{ {
switch (muvjel) switch (muvjel)
{ {
case '+': case '+':
@@ -49,7 +41,7 @@ namespace calculator
break; break;
case '-': case '-':
eredm = szam1 +-szam2; eredm = szam1 - szam2;
break; break;
case '*': case '*':
@@ -63,13 +55,9 @@ namespace calculator
default: default:
uzen = "Hibás műveleti jel"; uzen = "Hibás műveleti jel";
break; break;
} }
Console.WriteLine(uzen + eredm);
Console.ReadKey();
return eredm;
return eredm;
} }
} }
} }

View File

@@ -0,0 +1 @@
928a2f392e2cc7f5b3ca8856e93e56308a3914d2

View File

@@ -0,0 +1,8 @@
C:\dev\c#\c-sharp\calculator\bin\x64\Debug\calculator.exe.config
C:\dev\c#\c-sharp\calculator\bin\x64\Debug\calculator.exe
C:\dev\c#\c-sharp\calculator\bin\x64\Debug\calculator.pdb
C:\dev\c#\c-sharp\calculator\obj\x64\Debug\calculator.csproj.AssemblyReference.cache
C:\dev\c#\c-sharp\calculator\obj\x64\Debug\calculator.csproj.SuggestedBindingRedirects.cache
C:\dev\c#\c-sharp\calculator\obj\x64\Debug\calculator.csproj.CoreCompileInputs.cache
C:\dev\c#\c-sharp\calculator\obj\x64\Debug\calculator.exe
C:\dev\c#\c-sharp\calculator\obj\x64\Debug\calculator.pdb

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,23 @@
MSTest Framework
Copyright (c) Microsoft Corporation. All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Binary file not shown.

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)..\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)..\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)..\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
</ItemGroup>
<ItemGroup>
<!-- Including `@(TestAdapterContent)` in the `None` ItemGroup to get the `CopyToOutputDirectory`
behavior be default, package consumers can opt-out of this behavior
by removing `@(TestAdapterContent)` from the `None` ItemGroup
i.e. `<None Remove="@(TestAdapterContent)" />` -->
<None Include="@(TestAdapterContent)" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<EnableMSTestV2CopyResources Condition="$(EnableMSTestV2CopyResources) == ''">true</EnableMSTestV2CopyResources>
</PropertyGroup>
<Target Name="GetMSTestV2CultureHierarchy">
<!-- Only traversing 5 levels in the culture hierarchy. This is the maximum lenght for all cultures and should be sufficient to get to a culture name that maps to a resource folder we package.
The root culture name for all cultures is invariant whose name is ''(empty) and the parent for invariant culture is invariant itself.(https://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.parent(v=vs.110).aspx.)
So the below code should not break build in any case. -->
<ItemGroup>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Name)" />
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Name) != ''"/>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Name) != ''"/>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Name) != ''"/>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Parent.Name) != ''"/>
</ItemGroup>
</Target>
<!-- Copy resources over to $(TargetDir) if this is a localized build. -->
<Target Name="CopyMSTestV2Resources" BeforeTargets="PrepareForBuild" Condition="$(EnableMSTestV2CopyResources) == 'true'" DependsOnTargets="GetMSTestV2CultureHierarchy">
<ItemGroup>
<MSTestV2ResourceFiles Include="$(MSBuildThisFileDirectory)..\_common\%(CurrentUICultureHierarchy.Identity)\*resources.dll">
<CultureString>%(CurrentUICultureHierarchy.Identity)</CultureString>
</MSTestV2ResourceFiles>
<Content Include="@(MSTestV2ResourceFiles)" Condition="@(MSTestV2ResourceFiles) != ''">
<Link>%(MSTestV2ResourceFiles.CultureString)\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</Content>
</ItemGroup>
</Target>
</Project>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)..\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)..\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
</ItemGroup>
<ItemGroup>
<!-- Including `@(TestAdapterContent)` in the `None` ItemGroup to get the `CopyToOutputDirectory`
behavior be default, package consumers can opt-out of this behavior
by removing `@(TestAdapterContent)` from the `None` ItemGroup
i.e. `<None Remove="@(TestAdapterContent)" />` -->
<None Include="@(TestAdapterContent)" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)..\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)..\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
</ItemGroup>
<ItemGroup>
<!-- Including `@(TestAdapterContent)` in the `None` ItemGroup to get the `CopyToOutputDirectory`
behavior be default, package consumers can opt-out of this behavior
by removing `@(TestAdapterContent)` from the `None` ItemGroup
i.e. `<None Remove="@(TestAdapterContent)" />` -->
<None Include="@(TestAdapterContent)" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<EnableMSTestV2CopyResources Condition="$(EnableMSTestV2CopyResources) == ''">true</EnableMSTestV2CopyResources>
</PropertyGroup>
<Target Name="GetMSTestV2CultureHierarchy">
<!-- Only traversing 5 levels in the culture hierarchy. This is the maximum lenght for all cultures and should be sufficient to get to a culture name that maps to a resource folder we package.
The root culture name for all cultures is invariant whose name is ''(empty) and the parent for invariant culture is invariant itself.(https://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.parent(v=vs.110).aspx.)
So the below code should not break build in any case. -->
<ItemGroup>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Name)" />
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Name)"/>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Name) != ''"/>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Name) != ''"/>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Parent.Name) != ''"/>
</ItemGroup>
</Target>
<!-- Copy resources over to $(TargetDir) if this is a localized build. -->
<Target Name="CopyMSTestV2Resources" BeforeTargets="PrepareForBuild" Condition="$(EnableMSTestV2CopyResources) == 'true'" DependsOnTargets="GetMSTestV2CultureHierarchy">
<PropertyGroup>
<CurrentUICultureHierarchy>%(CurrentUICultureHierarchy.Identity)</CurrentUICultureHierarchy>
</PropertyGroup>
<ItemGroup>
<MSTestV2Files Include="$(MSBuildThisFileDirectory)..\_common\*.dll" />
</ItemGroup>
<ItemGroup>
<Content Include="@(MSTestV2Files->'%(RootDir)%(Directory)$(CurrentUICultureHierarchy)\%(FileName).resources.dll')"
Condition="Exists('%(RootDir)%(Directory)$(CurrentUICultureHierarchy)\%(FileName).resources.dll')">
<Link>$(CurrentUICultureHierarchy)\%(FileName).resources.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<BaseAssemblyFullPath>%(FullPath)</BaseAssemblyFullPath>
<Visible>False</Visible>
</Content>
</ItemGroup>
</Target>
</Project>

Binary file not shown.

View File

@@ -0,0 +1,23 @@
MSTest Framework
Copyright (c) Microsoft Corporation. All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Some files were not shown because too many files have changed in this diff Show More