Skip to content

Commit 62ee91d

Browse files
committed
refactor: unit tests fixed
1 parent 6da17d5 commit 62ee91d

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

MapperAI.sln.DotSettings.user

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<TestId>xUnit::8B3E109D-96CA-4B6D-B379-6AF70646DC25::net8.0::MapperAI.Test.FileMapperTests.Test_Should_Create_4_Files_With_Go_Extension</TestId>
1818
<TestId>xUnit::8B3E109D-96CA-4B6D-B379-6AF70646DC25::net8.0::MapperAI.Test.FileMapperTests.Test_Should_Create_4_Files_With_CSharp_Extension</TestId>
1919
<TestId>xUnit::8B3E109D-96CA-4B6D-B379-6AF70646DC25::net8.0::MapperAI.Test.DI.DependencyInjectionTests.AddMapperAI_ShouldRegisterServices</TestId>
20+
<TestId>xUnit::8B3E109D-96CA-4B6D-B379-6AF70646DC25::net8.0::MapperAI.Test.FileMapperTests</TestId>
2021
</TestAncestor>
2122
&lt;/SessionState&gt;</s:String></wpf:ResourceDictionary>

src/MapperAI.Core/MapperAI.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Title>MapperAI-Alpha</Title>
88
<Authors>Dridev</Authors>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
10-
<Version>0.1.1-alpha</Version>
10+
<Version>0.1.2-alpha</Version>
1111
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1212
<RepositoryUrl>https://github.com/01Dri/MapperAI</RepositoryUrl>
1313
<RootNamespace>MapperAI.Core</RootNamespace>

test/MapperAI.Test/FileMapperTests.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ public async Task Test_Should_Create_4_Files_With_Go_Extension()
3232
Extension = "go",
3333
};
3434
await _mapper.MapAsync(configuration);
35-
var files = Directory.GetFiles(OutputFolder);
36-
Assert.True(files.Length == 4);
37-
Assert.True(files.All(x => x.Contains(".go")));
35+
var files = Directory.GetFiles(OutputFolder).Where(x => x.Contains("go")).ToList();
36+
Assert.True(files.Count == 4);
3837

3938

4039
}
@@ -69,10 +68,8 @@ public async Task Test_Should_Create_1_File_With_CSharp_Extension()
6968
LanguageVersion = "13"
7069
};
7170
await _mapper.MapAsync(configuration);
72-
var files = Directory.GetFiles(OutputFolder);
73-
Assert.True(files.Length == 1);
74-
Assert.True(files.All(x => x.Contains(".cs")));
75-
71+
var files = Directory.GetFiles(OutputFolder).Where(x => x.Contains(".cs")).ToList();
72+
Assert.True(files.Count == 1);
7673

7774
}
7875
}

0 commit comments

Comments
 (0)