public void UseJsonRpcServices() { var builderMock = new Mock <IApplicationBuilder>(MockBehavior.Strict); builderMock.Setup(o => o.New()) .Returns(builderMock.Object); builderMock.Setup(o => o.Use(It.IsNotNull <Func <RequestDelegate, RequestDelegate> >())) .Returns(builderMock.Object); builderMock.Setup(o => o.Build()) .Returns(c => Task.CompletedTask); JsonRpcBuilderExtensions.UseJsonRpcServices(builderMock.Object); }
public void UseJsonRpcServicesWhenBuilderIsNull() { Assert.ThrowsException <ArgumentNullException>(() => JsonRpcBuilderExtensions.UseJsonRpcServices(null)); }