Skip to content

Commit 4e13b94

Browse files
committed
Updated README.md and added a test to cover the current Obsolete method for the time being
1 parent ae9ed29 commit 4e13b94

2 files changed

Lines changed: 24 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public sealed class SimpleReaction : IPipelineReaction<TheInput, TheOutput>
6767
}
6868
```
6969

70-
### - Create a pipeline with your input and output types
70+
### Create a pipeline with your input and output types
7171
Create a pipeline based on the input and output types.
7272
```
7373
var pipeline = pipelineFactory.CreatePipeline<TheInput, TheOutput>();

src/ZippyNeuron.Pipelinez.Tests/PipelineServicesTests.cs

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,33 @@ public void Setup()
1616
[Test]
1717
public void AddPipelineServices_ShouldRegisterServices()
1818
{
19-
var provider = _serviceCollection
19+
var serviceProvider = _serviceCollection
2020
.AddPipelineServices()
2121
.BuildServiceProvider();
2222

23-
var pipelineFactory = provider.GetService<IPipelineFactory>();
24-
var pipelineStateBag = provider.GetService<IPipelineStateBag>();
23+
AssertPipelinezServicesAreRegistered(serviceProvider);
24+
}
25+
26+
[Test]
27+
public void AddPipelinezServices_ShouldRegisterServices()
28+
{
29+
var serviceProvider = _serviceCollection
30+
.AddPipelinezServices()
31+
.BuildServiceProvider();
32+
33+
AssertPipelinezServicesAreRegistered(serviceProvider);
34+
}
35+
36+
private static void AssertPipelinezServicesAreRegistered(IServiceProvider serviceProvider)
37+
{
38+
var pipelineFactory = serviceProvider.GetService<IPipelineFactory>();
39+
var pipelineReactionsRunner = serviceProvider.GetService<IPipelineReactionsRunner>();
40+
var pipelineReactionInvoker = serviceProvider.GetService<IPipelineReactionInvoker>();
41+
var pipelineStateBag = serviceProvider.GetService<IPipelineStateBag>();
2542

2643
Assert.That(pipelineFactory, Is.Not.Null);
44+
Assert.That(pipelineReactionsRunner, Is.Not.Null);
45+
Assert.That(pipelineReactionInvoker, Is.Not.Null);
2746
Assert.That(pipelineStateBag, Is.Not.Null);
2847
}
29-
}
48+
}

0 commit comments

Comments
 (0)