public void Test_disconnect_all(bool retry) { // Arrange var mockProxy = new Mock <ITopicBrokerClientProxy>(); _mockClientManager.SetupGet(c => c.All).Returns(mockProxy.Object); // Act _messageHub.DisconnectAll(retry); // Assert mockProxy.Verify(m => m.serverOrderedDisconnect(retry)); }