public void Calling_Dispose_on_a_closed_channel_should_not_throw() { TestDelegate alreadyClosedChannel = () => { var subject = new WcfChannel <IEmptyClient>(TestUri); IEmptyClient client = subject.Client; subject.Dispose(); subject.Dispose(); }; Assert.DoesNotThrow(alreadyClosedChannel); }
public void Calling_Dispose_on_a_closed_channel_should_not_throw() { TestDelegate alreadyClosedChannel = () => { var subject = new WcfChannel<IEmptyClient>(TestUri); IEmptyClient client = subject.Client; subject.Dispose(); subject.Dispose(); }; Assert.DoesNotThrow(alreadyClosedChannel); }
public void Calling_the_client_after_dispose_should_throw_InvalidOperationException() { var subject = new WcfChannel<IEmptyClient>(TestUri); IEmptyClient client = subject.Client; subject.Dispose(); Assert.Throws<InvalidOperationException>(() => { IEmptyClient secondAccess = subject.Client; }); }
public void Calling_the_client_after_dispose_should_throw_InvalidOperationException() { var subject = new WcfChannel <IEmptyClient>(TestUri); IEmptyClient client = subject.Client; subject.Dispose(); Assert.Throws <InvalidOperationException>(() => { IEmptyClient secondAccess = subject.Client; }); }