public async Task ShouldThrowException() { var service = new ReversoService(); var result = await service.TranslateText(new TranslateTextRequest(Language.En, Language.Ru) { Source = "" }); Assert.True(result.Error); Assert.Equal("Source is empty", result.Message); }
public async Task ShouldTranslateText() { var service = new ReversoService(); var result = await service.TranslateText(new TranslateTextRequest(Language.En, Language.Ru) { Source = "Private methods" }); Assert.NotNull(result.Translation); Assert.False(result.Error); }