public void EnglishConverter_ConvertNumberTest_ArgumentException(ulong input) { //Arrange EnglishConverter converter = new EnglishConverter(); //Act string actual = converter.ConvertNumber(input); }
public void EnglishConverter_ConvertNumberTest_ZeroTest() { // Arrange ulong input = 0; string expected = "zero"; EnglishConverter converter = new EnglishConverter(); // Act string actual = converter.ConvertNumber(input); // Assert Assert.AreEqual(expected, actual); }
/// <summary> /// Supporting method for testing of ConvertNumber method with different test data /// </summary> public void TestDifferentData() { // Arrange ulong input = Convert.ToUInt64(TestContext.DataRow["input"]); string expected = Convert.ToString(TestContext.DataRow["expectedENG"]); EnglishConverter converter = new EnglishConverter(); // Act string actual = converter.ConvertNumber(input); // Assert Assert.AreEqual(expected, actual); }
static void Main(string[] args) { Console.Title = "Cloud Synchronizer Translations"; Console.ForegroundColor = ConsoleColor.Gray; // read file FileReader fr = new FileReader(@"C:/Sources/GeodeticDictionaryCloudUploader/gdDictionaryIndexUploader/words/Dictionary_Static_Content_11_04_2012_Surveying.txt"); string[] lines = fr.ReadLines(); // convert to different models var translationConverter = new TranslationsConverter(lines); TranslationSearchModel[] translationModel = translationConverter.Convert(); var englishConverter = new EnglishConverter(lines); EnglishSearchModel[] englishModel = englishConverter.Convert(); var germanConverter = new GermanConverter(lines); GermanSearchModel[] germanModel = germanConverter.Convert(); LogSuccess("model created"); // create service clients var translationClient = SearchClientCreator.Create("translations"); SearchIndexAccess <TranslationSearchModel> translationAccess = new SearchIndexAccess <TranslationSearchModel>(translationClient); var germanClient = SearchClientCreator.Create("german"); SearchIndexAccess <GermanSearchModel> germanAccess = new SearchIndexAccess <GermanSearchModel>(germanClient); var englishClient = SearchClientCreator.Create("english"); SearchIndexAccess <EnglishSearchModel> englishAccess = new SearchIndexAccess <EnglishSearchModel>(englishClient); LogSuccess("client created"); // upload LogInfo("uploading translations..."); translationAccess.Upload(translationModel, 500); LogInfo("uploading german..."); germanAccess.Upload(germanModel, 500); LogInfo("uploading english..."); englishAccess.Upload(englishModel, 500); LogSuccess("upload finished"); Console.ReadLine(); }