public void RetrieveFrenchFirst250CommonVerbsWithVerbTenses() { IEnumerable <(string VerbName, string ConjugationPath)> verbsInfo = ReversoContextCommonVerbs.RetrieveVerbsFromIndex("french", "1-250"); int actualCount = verbsInfo.Count(); List <Verb> verbs = new List <Verb>(); foreach (var verbInfo in verbsInfo) { var verb = ReversoContextVerbConjugations.GetVerbWithTenses("french", verbInfo.VerbName); verbs.Add(verb); } Assert.Equal(verbs.Count, actualCount); }
public void RetrieveFrenchVerbWithVerbTenses() { var expectedTenseCount = 22; var verb = ReversoContextVerbConjugations.GetVerbWithTenses("french", "regarder"); foreach (var verbTense in verb.VerbTenses) { output.WriteLine(verbTense.VerbTenseName); PrintConjugations(verbTense.Conjugations); output.WriteLine("\n"); } Assert.Equal(expectedTenseCount, verb.VerbTenses.Count); }
public void RetrieveItalianVerbWithVerbTenses() { var expectedTenseCount = 20; var verb = ReversoContextVerbConjugations.GetVerbWithTenses("italian", "vivere"); foreach (var verbTense in verb.VerbTenses) { output.WriteLine(verbTense.VerbTenseName); PrintConjugations(verbTense.Conjugations); output.WriteLine("\n"); } Assert.Equal(expectedTenseCount, verb.VerbTenses.Count); }
public void AddingItalianVerbToDb() { //Given var verb = ReversoContextVerbConjugations.GetVerbWithTenses("italian", "vivere"); Program.Configure(); var mappedVerbs = Program.MapVerbs(new List <Verb> { verb }); //When var count = Program.AddVerbs(mappedVerbs); //Then Assert.True(count > 0); }
public void AddingFrenchVerbToDb() { //Given var verb = ReversoContextVerbConjugations.GetVerbWithTenses("french", "ĂȘtre"); Program.Configure(); var mappedVerbs = Program.MapVerbs(new List <Verb> { verb }); //When var count = Program.AddVerbs(mappedVerbs); //Then output.WriteLine("Insertion count: {0}", count); Assert.True(count > 0); }
public void MapVerbs() { //Given var verb = ReversoContextVerbConjugations.GetVerbWithTenses("italian", "vivere"); //When Program.Configure(); var mappedVerb = Program.MapVerbs(new List <Verb> { verb }).FirstOrDefault(); var tensePassatoProssimo = mappedVerb.VerbTenses .FirstOrDefault(vt => vt.TenseName == "Indicativo Passato prossimo"); var firstConjugation = (BL.CompoundConjugation)tensePassatoProssimo.Conjugations.FirstOrDefault(); var lastConjugation = (BL.CompoundConjugation)tensePassatoProssimo.Conjugations.LastOrDefault(); //Then Assert.Equal("io", firstConjugation.Pronoun); Assert.Equal("ho", firstConjugation.AuxiliaryVerb); Assert.Equal("vissuto", firstConjugation.InflictedVerb); Assert.Equal("loro", lastConjugation.Pronoun); Assert.Equal("sono", lastConjugation.AuxiliaryVerb); Assert.Equal("vissute", lastConjugation.InflictedVerb); }