Skip to content

Commit 14160ed

Browse files
committed
setup service collection
1 parent 428ab6b commit 14160ed

File tree

3 files changed

+102
-30
lines changed

3 files changed

+102
-30
lines changed

JsonApiDotNetCoreTests/Class1.cs renamed to JsonApiDotNetCoreTests/Extensions/Class1.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
using Xunit;
2+
using JsonApiDotNetCore.Extensions;
23

3-
namespace JsonApiDotNetCoreTests
4+
namespace JsonApiDotNetCoreTests.Extensions
45
{
56
// see example explanation on xUnit.net website:
67
// https://xunit.github.io/docs/getting-started-dotnet-core.html
7-
public class Class1
8+
public class AddJsonApiAdds
89
{
910
[Fact]
1011
public void PassingTest()
1112
{
1213
Assert.Equal(4, Add(2, 2));
1314
}
1415

15-
[Fact]
16-
public void FailingTest()
17-
{
18-
Assert.Equal(5, Add(2, 2));
19-
}
20-
2116
int Add(int x, int y)
2217
{
2318
return x + y;
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
using System;
2+
using System.Collections;
3+
using System.Collections.Generic;
4+
using Microsoft.Extensions.DependencyInjection;
5+
6+
namespace JsonApiDotNetCoreTests
7+
{
8+
public class ServiceCollection : IServiceCollection
9+
{
10+
public int IndexOf(ServiceDescriptor serviceDescriptor)
11+
{
12+
throw new NotImplementedException();
13+
}
14+
15+
public void Insert(int pos, ServiceDescriptor serviceDescriptor)
16+
{
17+
throw new NotImplementedException();
18+
}
19+
20+
public void RemoveAt(int pos)
21+
{
22+
throw new NotImplementedException();
23+
}
24+
25+
public bool Remove(ServiceDescriptor serviceDescriptor)
26+
{
27+
throw new NotImplementedException();
28+
}
29+
30+
public void Add(ServiceDescriptor serviceDescriptor)
31+
{
32+
throw new NotImplementedException();
33+
}
34+
35+
public void Clear()
36+
{
37+
throw new NotImplementedException();
38+
}
39+
40+
public bool Contains(ServiceDescriptor serviceDescriptor)
41+
{
42+
throw new NotImplementedException();
43+
}
44+
45+
public void CopyTo(ServiceDescriptor[] serviceDescriptor, int pos)
46+
{
47+
throw new NotImplementedException();
48+
}
49+
50+
public IEnumerable<ServiceDescriptor>.IEnumerator<ServiceDescriptor> GetEnumerator()
51+
{
52+
throw new NotImplementedException();
53+
}
54+
55+
public IEnumerator GetEnumerator()
56+
{
57+
throw new NotImplementedException();
58+
}
59+
60+
public int Count { get; set; }
61+
public bool IsReadOnly { get; set; }
62+
63+
}
64+
}

JsonApiDotNetCoreTests/project.json

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,39 @@
11
{
2-
"version": "1.0.0-*",
3-
"testRunner": "xunit",
4-
"dependencies": {
5-
"dotnet-test-xunit": "2.2.0-preview2-build1029",
6-
"xunit": "2.2.0-beta2-build3300"
7-
},
8-
"frameworks": {
9-
"netcoreapp1.0": {
10-
"dependencies": {
11-
"Microsoft.NETCore.App": {
12-
"type": "platform",
13-
"version": "1.0.0"
14-
}
15-
}
2+
"version": "1.0.0-*",
3+
"testRunner": "xunit",
4+
"dependencies": {
5+
"JsonApiDotNetCore": "1.0.0",
6+
"dotnet-test-xunit": "2.2.0-preview2-build1029",
7+
"xunit": "2.2.0-beta2-build3300"
8+
},
9+
"frameworks": {
10+
"netcoreapp1.0": {
11+
"imports": [
12+
"dotnet5.6",
13+
"portable-net45+win8"
14+
],
15+
"dependencies": {
16+
"Microsoft.NETCore.App": {
17+
"type": "platform",
18+
"version": "1.0.0"
1619
}
17-
},
18-
"buildOptions": {
19-
"copyToOutput": {
20-
"include": [ "xunit.runner.json" ]
21-
}
22-
},
23-
"tooling": {
24-
"defaultNamespace": "JsonApiDotNetCoreTests"
20+
}
21+
}
22+
},
23+
"buildOptions": {
24+
"copyToOutput": {
25+
"include": [
26+
"xunit.runner.json"
27+
]
28+
}
29+
},
30+
"tooling": {
31+
"defaultNamespace": "JsonApiDotNetCoreTests"
32+
},
33+
"tools": {
34+
"Microsoft.DotNet.Watcher.Tools": {
35+
"version": "1.0.0-*",
36+
"imports": "portable-net451+win8"
2537
}
38+
}
2639
}

0 commit comments

Comments
 (0)