Adding tests

This commit is contained in:
2025-05-19 00:03:27 +02:00
parent ec0847e95c
commit 58b7e75e77

View File

@@ -5,12 +5,10 @@ using BasicDotnetTemplate.MainProject.Models.Common;
namespace BasicDotnetTemplate.MainProject.Tests;
[TestClass]
public static class FileUtils_Tests
public class FileUtils_Tests
{
[TestMethod]
public static void ConvertFileToObject_NoFilePath()
{
try
public void ConvertFileToObject_NoFilePath()
{
try
{
@@ -26,17 +24,9 @@ public static class FileUtils_Tests
Assert.Fail($"An exception was thrown: {exception}");
}
}
catch (Exception ex)
{
Console.WriteLine(ex.InnerException);
Assert.Fail($"An exception was thrown: {ex}");
}
}
[TestMethod]
public static void ConvertFileToObject_NoFile()
{
try
public void ConvertFileToObject_NoFile()
{
try
{
@@ -52,12 +42,7 @@ public static class FileUtils_Tests
Assert.Fail($"An exception was thrown: {exception}");
}
}
catch (Exception ex)
{
Console.WriteLine(ex.InnerException);
Assert.Fail($"An exception was thrown: {ex}");
}
}
}