public async Task DictionaryAPIOkNotChsMeaning() { string result = ""; _client.SetType(MockApiClient.Type.OkNotChsMeaning); result = await DictionaryAPIConnection.GetResult(_client, "eng", "eng", "Taiwan"); Assert.AreEqual("English meaning", result); }
public async Task DictionaryAPIOkChsMeaning() { string result = ""; _client.SetType(MockApiClient.Type.OkChsMeaning); result = await DictionaryAPIConnection.GetResult(_client, "zho", "zho", "中文"); Assert.AreEqual("簡化字", result); }
public async Task DictionaryAPIOkChsPhrase() { string result = ""; _client.SetType(MockApiClient.Type.OkChsPhrase); result = await DictionaryAPIConnection.GetResult(_client, "eng", "zho", "Taiwan"); Assert.AreEqual("簡化字", result); }
private async void getResult(string fromCode, string toCode, string input) { resultBox.Text = await DictionaryAPIConnection.GetResult(_client, fromCode, toCode, input); _isConn = false; inputBox.Enabled = true; fromBox.Enabled = true; toBox.Enabled = true; submitBtn.Enabled = true; }