public void Dispose_NotInitialized_CantDoStuff() { var socketMock = new Mock <IWebSocket>(); var subject = new Binance(socketMock.Object, Mock.Of <IBinanceClient>(), Mock.Of <ITime>()); subject.Dispose(); var e = Expect.ThrowAsync <InvalidOperationException>(async() => { await subject.GetCurrentPrice(); }); Assert.AreEqual("Binance cannot GetCurrentPrice until Initialized!", e.Message); socketMock.Verify(m => m.Dispose()); }