public void GetSection_WithNoValidSection_ShouldNotBeNull() { var sut = new SectionExtractor(); var section = sut.GetSection<string>("connectionStrings"); section.ShouldBeNull(); }
public void GetSection_WithNonExistingSection_ShouldNotBeNull() { var sut = new SectionExtractor(); var section = sut.GetSection<ConnectionStringsSection>("connectionStrings2"); section.ShouldBeNull(); }
private static async Task <ISection> AskForSection() { await SectionExtractor.ExtractSectionsForCourse(SharedVars.SelectedCourseLink); var result = MenuChooseItem.AskInputForSingleItemFromList(SharedVars.Sections, "section"); SharedVars.SelectedSection = result; return(result); }
private void CheckStructure(string expectedResult, string src) { Parse(src, parser => { var file = parser.file(); var extractor = new SectionExtractor(); extractor.Visit(file); extractor.Outpout.Should().Be(expectedResult); }); }