Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Ershad95 committed Feb 14, 2023
1 parent 70eb309 commit 45fabfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TestCreator.Core/EnumTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static void WriteUnitTest(string path, string[] selectedAssembly)
{
if (string.IsNullOrEmpty(path))
throw new ArgumentException("path is null");

if (!Directory.Exists(path))
throw new ArgumentException("path is not valid");

Expand Down
3 changes: 1 addition & 2 deletions TestCreator.Core/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ private static string CreateFileContent(Type @enum)
var nameSpace = @enum.FullName!.Replace($".{@enum.Name}", string.Empty);
fileContent.Append($"namespace unitTest.{@enum.Name};\nusing {nameSpace};\n");
fileContent.Append($"public class {@enum.Name}UnitTest \n{{ \n");



foreach (var item in @enum.GetEnumValues())
{
var valueItem = (long)Convert.ChangeType(item, typeof(long));
Expand Down

0 comments on commit 45fabfd

Please sign in to comment.