public void RemovingGlossFromEmptyEntry_RemovesEntry() { RecordToken <LexEntry> token = PrepareEntryWithOneMeaning(); //now simulate removing it, as when the user wants to correct spelling Task.TryToRemoveAssociationWithListWordFromEntry(token); Assert.AreEqual(0, _lexEntryRepository.GetEntriesWithMatchingLexicalForm("uno", VernWs). Count); Task.Deactivate(); }
public void Ctor_EmptyTemplate_DoesntCrash() { GatherWordListTask g = new GatherWordListTask( GatherWordListConfig.CreateForTests(_simpleWordListFilePath, WritingSystemsIdsForTests.AnalysisIdForTest, _catalog), _lexEntryRepository, _viewTemplate, new TaskMemoryRepository()); g.Activate(); Assert.IsNotNull(g); g.Deactivate(); }
public void Activate_MissingWordListFile_GivesMessage() { GatherWordListTask g = new GatherWordListTask( GatherWordListConfig.CreateForTests("NotThere.txt", WritingSystemsIdsForTests.AnalysisIdForTest, new WordListCatalog()), _lexEntryRepository, _viewTemplate, new TaskMemoryRepository()); // the code doesn't show the errror box in release builds, but // the builder publishing configuration does run tests in release builds using (new Palaso.Reporting.ErrorReport.NonFatalErrorReportExpected()) { g.Activate(); } g.Deactivate(); }