From 88d874bbe0560fef8967536261184f22f7abc30c Mon Sep 17 00:00:00 2001 From: Louis Date: Thu, 12 Oct 2023 09:34:33 +0200 Subject: [PATCH] feat: :see_no_evil: Add gitignore --- .gitignore | 23 +++++++++++++++++ .../.idea/.gitignore | 13 ++++++++++ .../.idea/encodings.xml | 4 +++ Lecture/Exercises/Conversion.cs | 16 ++++++++++++ Lecture/Lecture.csproj | 10 ++++++++ Lecture/Program.cs | 2 ++ LectureTestingandDebug.sln | 22 ++++++++++++++++ README.md | 1 + Tests/Tests.csproj | 25 +++++++++++++++++++ Tests/UnitTest1.cs | 9 +++++++ Tests/Usings.cs | 1 + 11 files changed, 126 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.idea.LectureTestingandDebug/.idea/.gitignore create mode 100644 .idea/.idea.LectureTestingandDebug/.idea/encodings.xml create mode 100644 Lecture/Exercises/Conversion.cs create mode 100644 Lecture/Lecture.csproj create mode 100644 Lecture/Program.cs create mode 100644 LectureTestingandDebug.sln create mode 100644 README.md create mode 100644 Tests/Tests.csproj create mode 100644 Tests/UnitTest1.cs create mode 100644 Tests/Usings.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2ca528e --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +bin/ +obj/ +/packages/ +riderModule.iml +/_ReSharper.Caches/ + +# Rider +.idea/ +*.sln.iml +*.csproj.iml +*.sln.DotSettings.user +*.csproj.DotSettings.user +*.sln.DotSettings +*.csproj.DotSettings +*.sln.DotSettings.user.DotSettings +*.csproj.DotSettings.user.DotSettings +*.sln.DotSettings.user.DotSettings.user + +/Tests/bin/ +/Tests/obj/ + +/Lecture/bin/ +/Lecture/obj/ \ No newline at end of file diff --git a/.idea/.idea.LectureTestingandDebug/.idea/.gitignore b/.idea/.idea.LectureTestingandDebug/.idea/.gitignore new file mode 100644 index 0000000..d261414 --- /dev/null +++ b/.idea/.idea.LectureTestingandDebug/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/projectSettingsUpdater.xml +/contentModel.xml +/modules.xml +/.idea.LectureTestingandDebug.iml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.LectureTestingandDebug/.idea/encodings.xml b/.idea/.idea.LectureTestingandDebug/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/.idea/.idea.LectureTestingandDebug/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Lecture/Exercises/Conversion.cs b/Lecture/Exercises/Conversion.cs new file mode 100644 index 0000000..9980e9b --- /dev/null +++ b/Lecture/Exercises/Conversion.cs @@ -0,0 +1,16 @@ +namespace Lecture.Exercises; + +public class Conversion +{ + public static int StringToInt(string number) + { + int res = 0; + + for (int i = 0; i < 6; i++) + { + res = res * 10 + int.Parse(number[i].ToString()); + } + + return res; + } +} \ No newline at end of file diff --git a/Lecture/Lecture.csproj b/Lecture/Lecture.csproj new file mode 100644 index 0000000..2b14c81 --- /dev/null +++ b/Lecture/Lecture.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/Lecture/Program.cs b/Lecture/Program.cs new file mode 100644 index 0000000..fa620ca --- /dev/null +++ b/Lecture/Program.cs @@ -0,0 +1,2 @@ +Console.WriteLine(Lecture.Exercises.Conversion.StringToInt("123456")); +Console.WriteLine(Lecture.Exercises.Conversion.StringToInt("342523")); \ No newline at end of file diff --git a/LectureTestingandDebug.sln b/LectureTestingandDebug.sln new file mode 100644 index 0000000..267e821 --- /dev/null +++ b/LectureTestingandDebug.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lecture", "Lecture\Lecture.csproj", "{766C00F5-5826-4FB9-B209-76C4208C7E57}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {766C00F5-5826-4FB9-B209-76C4208C7E57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {766C00F5-5826-4FB9-B209-76C4208C7E57}.Debug|Any CPU.Build.0 = Debug|Any CPU + {766C00F5-5826-4FB9-B209-76C4208C7E57}.Release|Any CPU.ActiveCfg = Release|Any CPU + {766C00F5-5826-4FB9-B209-76C4208C7E57}.Release|Any CPU.Build.0 = Release|Any CPU + {FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 0000000..0826216 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Programming CM about Exception and testing diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj new file mode 100644 index 0000000..ba8cf18 --- /dev/null +++ b/Tests/Tests.csproj @@ -0,0 +1,25 @@ + + + + net7.0 + enable + enable + + false + true + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + diff --git a/Tests/UnitTest1.cs b/Tests/UnitTest1.cs new file mode 100644 index 0000000..279821b --- /dev/null +++ b/Tests/UnitTest1.cs @@ -0,0 +1,9 @@ +namespace Tests; + +public class UnitTest1 +{ + [Fact] + public void Test1() + { + } +} \ No newline at end of file diff --git a/Tests/Usings.cs b/Tests/Usings.cs new file mode 100644 index 0000000..8c927eb --- /dev/null +++ b/Tests/Usings.cs @@ -0,0 +1 @@ +global using Xunit; \ No newline at end of file