public async Task ShouldCallHandleAsync() { var textHandlerService = new TextHandlerService(new List <ITextHandler> { trueHandler.Object }); await textHandlerService.HandleTextAsync(user, chat, TestText); trueHandler.Verify(i => i.HandleAsync(user, chat, TestText)); }
public void WithNullUserShouldThrowException() { var textHandlerService = new TextHandlerService(new List <ITextHandler>()); Assert.ThrowsAsync <ArgumentNullException>(() => textHandlerService.HandleTextAsync(null, chat, TestText)); }
public void WithEmptyTextShouldThrowException() { var textHandlerService = new TextHandlerService(new List <ITextHandler>()); Assert.ThrowsAsync <ArgumentNullException>(() => textHandlerService.HandleTextAsync(user, chat, "")); }