-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7832fd5
commit cc37841
Showing
7 changed files
with
147 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...xercism.TestRunner.CSharp.IntegrationTests/Solutions/WithNonTestClasses/.meta/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"files": { | ||
"solution": ["Fake.cs"], | ||
"test": ["FakeTests.cs"], | ||
"example": [".meta/Example.cs"] | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
test/Exercism.TestRunner.CSharp.IntegrationTests/Solutions/WithNonTestClasses/Fake.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
public static class Fake | ||
{ | ||
public static int Add(int x, int y) => x + y; | ||
} |
18 changes: 18 additions & 0 deletions
18
test/Exercism.TestRunner.CSharp.IntegrationTests/Solutions/WithNonTestClasses/Fake.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net5.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Remove="Example.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" /> | ||
<PackageReference Include="xunit" Version="2.4.1" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" /> | ||
<PackageReference Include="Exercism.Tests" Version="0.1.0-alpha" /> | ||
</ItemGroup> | ||
|
||
</Project> |
18 changes: 18 additions & 0 deletions
18
test/Exercism.TestRunner.CSharp.IntegrationTests/Solutions/WithNonTestClasses/FakeTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Xunit; | ||
public class FakeTests | ||
{ | ||
private NumberComparer _numberComparer = new(); | ||
|
||
[Fact] | ||
public void Add_should_add_numbers() => _numberComparer.Compare(2, FakeHelper.AddOne(1)); | ||
|
||
private class NumberComparer | ||
{ | ||
public void Compare(int expected, int actual) => Assert.Equal(expected, actual); | ||
} | ||
} | ||
|
||
public static class FakeHelper | ||
{ | ||
public static int AddOne(int x) => Fake.Add(x, 1); | ||
} |
11 changes: 11 additions & 0 deletions
11
...ism.TestRunner.CSharp.IntegrationTests/Solutions/WithNonTestClasses/expected_results.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version": 3, | ||
"status": "pass", | ||
"tests": [ | ||
{ | ||
"name": "Add should add numbers", | ||
"status": "pass", | ||
"test_code": "Assert.Equal(2, Fake.Add(1, 1))" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters