public void DecoratedProjectionHandlersAreCopiedOnConstruction() { var handler1 = new CloudTableProjectionHandler(typeof(object), (client, message, token) => Task.FromResult(false)); var handler2 = new CloudTableProjectionHandler(typeof(object), (client, message, token) => Task.FromResult(false)); var projection = new CloudTableProjection(new[] { handler1, handler2 }); var sut = new CloudTableProjectionBuilder(projection); var result = sut.Build(); Assert.That(result.Handlers, Is.EquivalentTo(new[] { handler1, handler2 })); }
public void DecoratedProjectionHandlersAreCopiedOnConstruction() { var handler1 = new CloudTableProjectionHandler(typeof(object), (client, message, token) => Task.FromResult(false)); var handler2 = new CloudTableProjectionHandler(typeof(object), (client, message, token) => Task.FromResult(false)); var projection = new CloudTableProjection(new[] { handler1, handler2 }); var sut = new CloudTableProjectionBuilder(projection); var result = sut.Build(); Assert.That(result.Handlers, Is.EquivalentTo(new[] { handler1, handler2 })); }
public void InitialInstanceBuildReturnsExpectedResult() { var result = _sut.Build(); Assert.That(result.Handlers, Is.Empty); }