Exemplo n.º 1
0
        public void WithReporting_ShouldDecorateActor(
            [Modest] Actor actor,
            ReportingActor expected)
        {
            //arrange
            //act
            var actual = ActorExtensions.WithReporting(actor, expected.Observer, expected.MeasureTime).InnerActorBuilder(expected.Actor);

            //assert
            actual.Should().BeOfType <ReportingActor>().Which.Should().BeEquivalentTo(expected);
        }
Exemplo n.º 2
0
        public void WithReporting_WithIObserverOfString_ShouldDecorateActor(
            [Modest] Actor actor,
            ReportingActor expected,
            IObserver <string> observer)
        {
            //arrange
            //act
            var actual = ActorExtensions.WithReporting(actor, observer).InnerActorBuilder(expected.Actor);

            //assert
            actual.Should().BeOfType <ReportingActor>()
            .Which.Observer.Should().BeOfType <RenderedReportingObserver>()
            .Which.Observer.Should().Be(observer);
        }