Add simple test
This commit is contained in:
parent
9060d150b1
commit
c324cdef79
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -12,6 +12,9 @@ pipeline {
|
||||
steps {
|
||||
dir('Serwer') {
|
||||
sh "~/.dotnet/dotnet restore"
|
||||
}
|
||||
dir('Klient') {
|
||||
sh "~/.dotnet/dotnet restore"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -19,6 +22,9 @@ pipeline {
|
||||
steps {
|
||||
dir('Serwer') {
|
||||
sh "~/.dotnet/dotnet clean"
|
||||
}
|
||||
dir('Klient') {
|
||||
sh "~/.dotnet/dotnet clean"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -27,6 +33,16 @@ pipeline {
|
||||
dir('Serwer') {
|
||||
sh "~/.dotnet/dotnet build"
|
||||
}
|
||||
dir('Klient') {
|
||||
sh "~/.dotnet/dotnet build"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Tests') {
|
||||
steps {
|
||||
dir('Serwer') {
|
||||
sh "~/.dotnet/dotnet test"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
19
Serwer/Serwer.Tests/Serwer.Tests.csproj
Normal file
19
Serwer/Serwer.Tests/Serwer.Tests.csproj
Normal file
@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Serwer\Serwer.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
15
Serwer/Serwer.Tests/UnitTest1.cs
Normal file
15
Serwer/Serwer.Tests/UnitTest1.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using Xunit;
|
||||
|
||||
namespace Serwer.Tests
|
||||
{
|
||||
public class UnitTest1
|
||||
{
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
var x = 3;
|
||||
Assert.True(x == 3);
|
||||
}
|
||||
}
|
||||
}
|
@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.852
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serwer", "Serwer\Serwer.csproj", "{CCE1E4CC-EC14-46A3-BCC9-2CBD8F2284D6}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serwer", "Serwer\Serwer.csproj", "{CCE1E4CC-EC14-46A3-BCC9-2CBD8F2284D6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serwer.Tests", "Serwer.Tests\Serwer.Tests.csproj", "{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -15,6 +17,10 @@ Global
|
||||
{CCE1E4CC-EC14-46A3-BCC9-2CBD8F2284D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CCE1E4CC-EC14-46A3-BCC9-2CBD8F2284D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CCE1E4CC-EC14-46A3-BCC9-2CBD8F2284D6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
Loading…
Reference in New Issue
Block a user