mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-21 01:23:39 +00:00
Ajout tests unitaires
This commit is contained in:
parent
68411a786d
commit
3938bb42e4
4 changed files with 92 additions and 1 deletions
19
AideDeJeu/AideDeJeuUnitTest/AideDeJeuUnitTest.csproj
Normal file
19
AideDeJeu/AideDeJeuUnitTest/AideDeJeuUnitTest.csproj
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AideDeJeu\AideDeJeu.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
18
AideDeJeu/AideDeJeuUnitTest/UnitTest1.cs
Normal file
18
AideDeJeu/AideDeJeuUnitTest/UnitTest1.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using AideDeJeu.ViewModels;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace AideDeJeuUnitTest
|
||||
{
|
||||
[TestClass]
|
||||
public class UnitTest1
|
||||
{
|
||||
[TestMethod]
|
||||
public void TestMethod1()
|
||||
{
|
||||
var store = new StoreViewModel();
|
||||
var item = store.ToItem(null, AideDeJeu.Tools.Helpers.GetResourceString($"AideDeJeu.Data.sandbox.md"));
|
||||
var md = item.Markdown;
|
||||
Assert.IsNotNull(md);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue