示例#1
0
    public void CreateClient_Throws_If_Disposed()
    {
        // Arrange
        var target = new LambdaTestServer();

        target.Dispose();

        // Act
        Assert.Throws <ObjectDisposedException>(() => target.CreateClient());
    }
示例#2
0
    public async Task EnqueueAsync_Throws_If_Disposed()
    {
        // Arrange
        var target = new LambdaTestServer();

        target.Dispose();

        var request = new LambdaTestRequest(Array.Empty <byte>());

        // Act
        await Assert.ThrowsAsync <ObjectDisposedException>(() => target.EnqueueAsync(request));
    }