Skip to content

Commit 744ca6f

Browse files
authored
Merge pull request #5 from pfpack/feature/release-version-1.0.0
Increase the version to 1.0.0-preview.1.0.0
2 parents 6c066af + aa7c10f commit 744ca6f

19 files changed

+33
-76
lines changed

src/dependency-registry/DependencyRegistry.Tests/DependencyRegistry.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
<Description>PrimeFuncPack: A Functional Programming Pack for .NET</Description>
99
<Copyright>Copyright © 2020 Andrei Sergeev, Pavel Moskovoy</Copyright>
1010
<RootNamespace>PrimeFuncPack.DependencyRegistry.Tests</RootNamespace>
11-
<AssemblyName>EarlyFuncPack.DependencyRegistry.Tests</AssemblyName>
11+
<AssemblyName>PrimeFuncPack.DependencyRegistry.Tests</AssemblyName>
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="EarlyFuncPack.DependencyRegistry" Version="0.4.0" />
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
1716
<PackageReference Include="Moq" Version="4.16.1" />
17+
<PackageReference Include="PrimeFuncPack.DependencyRegistry" Version="1.0.0-preview.1.0.0" />
1818
<PackageReference Include="PrimeFuncPack.UnitTest.Data" Version="2.0.6" />
1919
<PackageReference Include="xunit" Version="2.4.1" />
2020
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">

src/dependency-registry/DependencyRegistry.Tests/Mock/MockServiceCollection.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ namespace PrimeFuncPack.DependencyRegistry.Tests
88
{
99
internal static class MockServiceCollection
1010
{
11-
public static Mock<IServiceCollection> CreateMock(
12-
Action<ServiceDescriptor>? callback = null)
11+
public static Mock<IServiceCollection> CreateMock(Action<ServiceDescriptor>? callback = null)
1312
{
1413
var mock = new Mock<IServiceCollection>();
1514

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,14 @@ namespace PrimeFuncPack.DependencyRegistry.Tests
1212
partial class DependencyRegistrarTest
1313
{
1414
[Theory]
15-
[InlineData(true)]
16-
[InlineData(false)]
17-
public void RegisterScoped_ExpectSourceServices(
18-
bool isNotNull)
15+
[InlineData(null)]
16+
[InlineData(SomeString)]
17+
public void RegisterScoped_ExpectSourceServices(string regService)
1918
{
2019
var mockServices = MockServiceCollection.CreateMock();
2120
var sourceServices = mockServices.Object;
2221

23-
string regService = isNotNull ? SomeString : null!;
24-
var registrar = DependencyRegistrar.Create(
25-
sourceServices,
26-
_ => regService);
22+
var registrar = DependencyRegistrar.Create(sourceServices, _ => regService);
2723

2824
var actualServices = registrar.RegisterScoped();
2925
Assert.Same(sourceServices, actualServices);
@@ -32,8 +28,7 @@ public void RegisterScoped_ExpectSourceServices(
3228
[Theory]
3329
[InlineData(true)]
3430
[InlineData(false)]
35-
public void RegisterScoped_ExpectCallAddScopedOnce(
36-
bool isNotNull)
31+
public void RegisterScoped_ExpectCallAddScopedOnce(bool isNotNull)
3732
{
3833
RefType regService = isNotNull ? ZeroIdRefType : null!;
3934
var mockServices = MockServiceCollection.CreateMock(
@@ -48,10 +43,7 @@ public void RegisterScoped_ExpectCallAddScopedOnce(
4843
});
4944

5045
var sourceServices = mockServices.Object;
51-
52-
var registrar = DependencyRegistrar.Create(
53-
sourceServices,
54-
_ => regService);
46+
var registrar = DependencyRegistrar.Create(sourceServices, _ => regService);
5547

5648
_ = registrar.RegisterScoped();
5749
mockServices.Verify(s => s.Add(It.IsAny<ServiceDescriptor>()), Times.Once);
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@ partial class DependencyRegistrarTest
1414
[Theory]
1515
[InlineData(true)]
1616
[InlineData(false)]
17-
public void RegisterSingleton_ExpectSourceServices(
18-
bool isNotNull)
17+
public void RegisterSingleton_ExpectSourceServices(bool isNotNull)
1918
{
2019
var mockServices = MockServiceCollection.CreateMock();
2120
var sourceServices = mockServices.Object;
2221

2322
object regService = isNotNull ? new object() : null!;
24-
var registrar = DependencyRegistrar.Create(
25-
sourceServices,
26-
_ => regService);
23+
var registrar = DependencyRegistrar.Create(sourceServices, _ => regService);
2724

2825
var actualServices = registrar.RegisterSingleton();
2926
Assert.Same(sourceServices, actualServices);
@@ -32,8 +29,7 @@ public void RegisterSingleton_ExpectSourceServices(
3229
[Theory]
3330
[InlineData(true)]
3431
[InlineData(false)]
35-
public void RegisterSingleton_ExpectCallAddSingletonOnce(
36-
bool isNotNull)
32+
public void RegisterSingleton_ExpectCallAddSingletonOnce(bool isNotNull)
3733
{
3834
RecordType regService = isNotNull ? PlusFifteenIdLowerSomeStringNameRecord : null!;
3935
var mockServices = MockServiceCollection.CreateMock(
@@ -48,10 +44,7 @@ public void RegisterSingleton_ExpectCallAddSingletonOnce(
4844
});
4945

5046
var sourceServices = mockServices.Object;
51-
52-
var registrar = DependencyRegistrar.Create(
53-
sourceServices,
54-
_ => regService);
47+
var registrar = DependencyRegistrar.Create(sourceServices, _ => regService);
5548

5649
_ = registrar.RegisterSingleton();
5750
mockServices.Verify(s => s.Add(It.IsAny<ServiceDescriptor>()), Times.Once);
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@ partial class DependencyRegistrarTest
1414
[Theory]
1515
[InlineData(true)]
1616
[InlineData(false)]
17-
public void RegisterTransient_ExpectSourceServices(
18-
bool isNotNull)
17+
public void RegisterTransient_ExpectSourceServices(bool isNotNull)
1918
{
2019
var mockServices = MockServiceCollection.CreateMock();
2120
var sourceServices = mockServices.Object;
2221

2322
RecordType regService = isNotNull ? PlusFifteenIdSomeStringNameRecord : null!;
24-
var registrar = DependencyRegistrar.Create(
25-
sourceServices,
26-
_ => regService);
23+
var registrar = DependencyRegistrar.Create(sourceServices, _ => regService);
2724

2825
var actualServices = registrar.RegisterTransient();
2926
Assert.Same(sourceServices, actualServices);
@@ -32,8 +29,7 @@ public void RegisterTransient_ExpectSourceServices(
3229
[Theory]
3330
[InlineData(true)]
3431
[InlineData(false)]
35-
public void RegisterTransient_ExpectCallAddTransientOnce(
36-
bool isNotNull)
32+
public void RegisterTransient_ExpectCallAddTransientOnce(bool isNotNull)
3733
{
3834
RefType regService = isNotNull ? MinusFifteenIdRefType : null!;
3935
var mockServices = MockServiceCollection.CreateMock(
@@ -48,10 +44,7 @@ public void RegisterTransient_ExpectCallAddTransientOnce(
4844
});
4945

5046
var sourceServices = mockServices.Object;
51-
52-
var registrar = DependencyRegistrar.Create(
53-
sourceServices,
54-
_ => regService);
47+
var registrar = DependencyRegistrar.Create(sourceServices, _ => regService);
5548

5649
_ = registrar.RegisterTransient();
5750
mockServices.Verify(s => s.Add(It.IsAny<ServiceDescriptor>()), Times.Once);
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ partial class DependencyRegistryExtensionsTest
1414
[Theory]
1515
[InlineData(true)]
1616
[InlineData(false)]
17-
public void RegisterScoped_ExpectSourceServices(
18-
bool isNotNull)
17+
public void RegisterScoped_ExpectSourceServices(bool isNotNull)
1918
{
2019
var mockServices = MockServiceCollection.CreateMock();
2120
var sourceServices = mockServices.Object;
@@ -32,8 +31,7 @@ public void RegisterScoped_ExpectSourceServices(
3231
[Theory]
3332
[InlineData(true)]
3433
[InlineData(false)]
35-
public void RegisterScoped_ExpectCallAddScopedOnce(
36-
bool isNotNull)
34+
public void RegisterScoped_ExpectCallAddScopedOnce(bool isNotNull)
3735
{
3836
RecordType regService = isNotNull ? MinusFifteenIdSomeStringNameRecord: null!;
3937
var mockServices = MockServiceCollection.CreateMock(

0 commit comments

Comments
 (0)