NUnit.Framework.Assert.That(TActual, NUnit.Framework.Constraints.IResolveConstraint, System.Func)

Here are the examples of the csharp api NUnit.Framework.Assert.That(TActual, NUnit.Framework.Constraints.IResolveConstraint, System.Func) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4637 Examples 7

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void MultiLine_key_value_query()
        {
            var keyValue = ConfigurationParser.MultiLineKeyValue.Parse(
      @"query: ""SELECT
        * 
        FROM workitems
        WHERE
            [System.TeamProject] = @project
            AND [System.WorkItemType] = 'Product Backlog Item'
            AND [System.IterationPath] = '{iterationPath}'""");
            replacedert.That(keyValue.Key, Is.EqualTo("query"));
            replacedert.That(keyValue.Value.Contains("[System.TeamProject] = @project"));
        }

19 View Source File : TemplateManagerTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Verify_correct_number_of_templates_is_scanned()
        {
            var sut = new TemplateManager(GetTemplateFolder("1"));
            replacedert.That(sut.TemplateCount, Is.EqualTo(4));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Valid_static_section()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[static]]
    filename: bla.docx
    pageBreak: true");
            var staticSection = def.AllSections.Single() as StaticWordSection;
            replacedert.That(staticSection.FileName, Is.EqualTo("bla.docx"));
            replacedert.That(staticSection.PageBreak, Is.EqualTo(true));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_Multiple_KeyValue()
        {
            var keyValues = ConfigurationParser.KeyValueList.Parse("key: value\nkey2: value2").ToArray();
            replacedert.That(keyValues.Length, Is.EqualTo(2));
            replacedert.That(keyValues[0].Key, Is.EqualTo("key"));
            replacedert.That(keyValues[0].Value, Is.EqualTo("value"));
            replacedert.That(keyValues[1].Key, Is.EqualTo("key2"));
            replacedert.That(keyValues[1].Value, Is.EqualTo("value2"));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Query_section_without_limit_default_to_max_value()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[query]]
    query: ""SELECT * FROM WorkItems Where [System.AreaPath] UNDER '{areaPath}' AND [System.IterationPath] UNDER '{iterationPath}'""
");
            var querySection = def.AllSections.Single() as QuerySection;
            replacedert.That(querySection.Limit, Is.EqualTo(Int32.MaxValue));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_Parsing_of_Parameters_with_allowed_values()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[parameterDefinition]]
    parama=string/A|B|C
    paramb=datetime");
            replacedert.That(def.ParameterDefinition, Is.Not.Null);
            var paramA = def.ParameterDefinition["parama"];
            replacedert.That(paramA.Type, Is.EqualTo("string"));
            replacedert.That(paramA.AllowedValues, Is.EquivalentTo(new[] { "A", "B", "C" }));

            var paramb = def.ParameterDefinition["paramb"];
            replacedert.That(paramb.Type, Is.EqualTo("datetime"));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Single_parameter_set()
        {
            var parameterList = ConfigurationParser.ParameterSetList.Parse(@"param1=a|param2=b").ToArray();
            replacedert.That(parameterList.Length, Is.EqualTo(2));
            replacedert.That(parameterList[0].Key, Is.EqualTo("param1"));
            replacedert.That(parameterList[0].Value, Is.EqualTo("a"));
            replacedert.That(parameterList[1].Key, Is.EqualTo("param2"));
            replacedert.That(parameterList[1].Value, Is.EqualTo("b"));
        }

19 View Source File : HtmlAgilityToolkitExtensionTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void SelectivelyRemoveSingleTagWithClosingSubsreplacedution()
        {
            var doc = new HtmlDoreplacedent();
            doc.LoadHtml("<p>paragraph</p><p>multiple</p>");
            doc.RemoveTags(doc.CreateElement("br"), "p");

            replacedert.That(doc.DoreplacedentNode.InnerHtml, Is.EqualTo("paragraph<br>multiple<br>"));
        }

19 View Source File : TemplateManagerTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Verify_template_with_syntax()
        {
            var sut = new TemplateManager(GetTemplateFolder("1"));
            var template = sut.GetWordDefinitionTemplate("TemplateA");
            replacedert.That(template, Is.Not.Null);
            replacedert.That(template.Name, Is.EqualTo("TemplateA"));

            var expected = Path.Combine(GetTemplateFolder("1"), "TemplateA", "Product Backlog Item.docx");
            replacedert.That(template.GetTemplateFor("Product BACKLOG Item"), Is.EqualTo(expected));
        }

19 View Source File : HtmlAgilityToolkitExtensionTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void RemoveTableLeavingContent()
        {
            var withoutTable = HtmlAgilityToolkitExtension.RemoveTable(htmlWithTable);

            replacedert.That(withoutTable.Contains("<span>test2</span>"));
            replacedert.That(!withoutTable.Contains("<table>"));
            replacedert.That(!withoutTable.Contains("<tr>"));
            replacedert.That(!withoutTable.Contains("<td>"));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_KeyValue()
        {
            var keyValue = ConfigurationParser.KeyValue.Parse("key: value");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo("value"));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Valid_query_section_with_table_file()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[query]]
    query: ""SELECT * FROM WorkItems Where [System.AreaPath] UNDER '{areaPath}' AND [System.IterationPath] UNDER '{iterationPath}'""
    tableTemplate: table.docx
");
            var querySection = def.AllSections.Single() as QuerySection;
            replacedert.That(querySection.TableTemplate, Is.EqualTo("table.docx"));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Support_for_base_template()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[definition]]
  type=excel
  baseTemplate=test.xlsx
[[parameters]]
  TargetDateStart=2019-06-01
  TargetDateEnd=2019-10-01
[[parameterDefinition]]");
            replacedert.That(def.BaseTemplate, Is.EqualTo ("test.xlsx"));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void SingleLine_with_semicolon()
        {
            var keyValue = ConfigurationParser.KeyValue.Parse("key: value:with:semicolon");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo("value:with:semicolon"));
        }

19 View Source File : HtmlAgilityToolkitExtensionTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void SelectivelyRemoveSingleTag()
        {
            var doc = new HtmlDoreplacedent();
            doc.LoadHtml("<p>paragraph</p><p>multiple</p>");
            doc.RemoveTags(null, "p");

            replacedert.That(doc.DoreplacedentNode.InnerHtml, Is.EqualTo("paragraphmultiple"));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void MultiLine_key_value_can_contain_square_bracket()
        {
            var keyValue = ConfigurationParser.MultiLineKeyValue.Parse(@"key: ""value
[value2]
value3""");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo("value\r\n[value2]\r\nvalue3"));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_Parsing_of_array_parameter_followed_by_other_params()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[arrayParameters]]
    tags=te,tr,ty
[[parameters]]
	TargetDateStart=2019-01-01");
            replacedert.That(def.ArrayParameterSection.ArrayParameters.Count, Is.EqualTo(1));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Parameter_without_default_value_and_other_line()
        {
            var keyValue = ParameterSection.Parameter.Parse(@"key
otherline");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo(""));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Parameter_with_default_value_and_spaces()
        {
            var keyValue = ParameterSection.Parameter.Parse("key  =  defValue");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo("defValue"));
        }

19 View Source File : TemplateManagerTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Verify_auto_parsing_of_structure_file()
        {
            var sut = new TemplateManager(GetTemplateFolder("1"));
            var template = sut.GetWordDefinitionTemplate("TemplateStructure");
            replacedert.That(template, Is.Not.Null);
            replacedert.That(template.TemplateDefinition, Is.Not.Null);
            replacedert.That(template.TemplateDefinition.AllSections.Length, Is.EqualTo(2));
            replacedert.That(template.TemplateDefinition.ParameterSection.Parameters.Keys, Is.EquivalentTo(new[] { "test", "blah" }));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Query_section_parse_specific_workItem_templates()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[query]]
    query: ""SELECT * FROM WorkItems Where [System.AreaPath] UNDER '{areaPath}' AND [System.IterationPath] UNDER '{iterationPath}'""
    template/Product Backlog Item: pbix.docx
    template/Bug: bugaa.docx
    limit: 1
");
            var querySection = def.AllSections.Single() as QuerySection;
            replacedert.That(querySection.GetTemplateForWorkItem("Product Backlog Item"), Is.EqualTo("pbix.docx"));
            replacedert.That(querySection.GetTemplateForWorkItem("Task"), Is.EqualTo(null));
            replacedert.That(querySection.Limit, Is.EqualTo(1));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Query_section_parse_filter_work_item_by_type()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[query]]
    query: ""SELECT * FROM WorkItems Where [System.AreaPath] UNDER '{areaPath}' AND [System.IterationPath] UNDER '{iterationPath}'""
    template/Product Backlog Item: pbix.docx
    template/Bug: bugaa.docx
    limit: 1
    workItemTypes: Product Backlog Item,Feature
");
            var querySection = def.AllSections.Single() as QuerySection;
            replacedert.That(querySection.GetTemplateForWorkItem("Product Backlog Item"), Is.EqualTo("pbix.docx"));
            replacedert.That(querySection.GetTemplateForWorkItem("Task"), Is.EqualTo(null));
            replacedert.That(querySection.WorkItemTypes, Is.EquivalentTo(new[] { "Product Backlog Item", "Feature" }));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Parameter_without_default_value()
        {
            var keyValue = ParameterSection.Parameter.Parse("key");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo(""));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_Parsing_of_custom_Parameters()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[parameters]]
    parama
    paramb
");
            replacedert.That(def.ParameterSection.Parameters.Keys, Is.EquivalentTo(new[] { "parama", "paramb" }));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_Parsing_of_Parameters_returns_parameter_section()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[parameters]]
    parama
    paramb");
            replacedert.That(def.ParameterSection, Is.Not.Null);
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Query_with_hierarchy_mode()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[query]]
    query: ""SELECT
    [System.Id],
    [System.WorkItemType],
    [System.replacedle],
    [System.replacedignedTo],
    [System.State],
    [System.Tags]
FROM workitemLinks
WHERE
    (
        [Source].[System.TeamProject] = @project
        AND [Source].[System.WorkItemType] = 'Feature'
        AND [Source].[Microsoft.VSTS.Scheduling.TargetDate] < '2002-01-01T00:00:00.0000000'
        AND [Source].[Microsoft.VSTS.Scheduling.TargetDate] > '2000-02-02T00:00:00.0000000'
    )
    AND (
        [System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward'
    )
    AND (
        [Target].[System.TeamProject] = @project
        AND [Target].[System.WorkItemType] <> ''
    )
MODE (Recursive)""
    hierarchyMode: task,feature,requirement,epic
");
            var querySection = def.AllSections.Single() as QuerySection;
            replacedert.That(querySection.HierarchyMode, Is.EquivalentTo(new[] { "task", "feature", "requirement", "epic" }));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Valid_query_iteration_parameter()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[query]]
    query: ""SELECT * FROM WorkItems Where [System.AreaPath] UNDER '{areaPath}' AND [System.IterationPath] UNDER '{iterationPath}'""
    tableTemplate: table.docx
    repeatForEachIteration: true
");
            var querySection = def.AllSections.Single() as QuerySection;
            replacedert.That(querySection.RepeatForEachIteration, Is.True);
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Default_template_type_is_word()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[parameters]]
  TargetDateStart=2019-06-01
  TargetDateEnd=2019-10-01
[[parameterDefinition]]");
            replacedert.That(def.Type, Is.EqualTo(TemplateType.Word));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Can_have_more_than_value_with_Single_key()
        {
            var keyValues = ConfigurationParser.KeyValueList.Parse("key: value\nkey: value2").ToArray();
            replacedert.That(keyValues.Length, Is.EqualTo(2));
            replacedert.That(keyValues[0].Key, Is.EqualTo("key"));
            replacedert.That(keyValues[0].Value, Is.EqualTo("value"));
            replacedert.That(keyValues[1].Key, Is.EqualTo("key"));
            replacedert.That(keyValues[1].Value, Is.EqualTo("value2"));
        }

19 View Source File : WordTemplateTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Verify_default_name_if_Work_item_type_does_not_esixts()
        {
            WordTemplateFolderManager sut = CreateSutForTemplate_1_A();
            var expected = Path.Combine(GetTemplate1AFolder(), "WorkItem.docx");
            replacedert.That(sut.GetTemplateFor("This type does not exists"), Is.EqualTo(expected));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_KeyValue_resilient_to_spaces()
        {
            var keyValue = ConfigurationParser.KeyValue.Parse("key  : value  ");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo("value"));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_Parsing_of_Parameters_with_default_value_returns_parameter_section()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[parameters]]
    parama=2017-01-01
    paramb=2019-04-31");
            replacedert.That(def.ParameterSection, Is.Not.Null);
            var paramA = def.ParameterSection.Parameters["parama"];
            replacedert.That(paramA, Is.EqualTo("2017-01-01"));

            var paramB = def.ParameterSection.Parameters["paramb"];
            replacedert.That(paramB, Is.EqualTo("2019-04-31"));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void MultiLine_key_value()
        {
            var keyValue = ConfigurationParser.MultiLineKeyValue.Parse(@"key: ""value

value2

value3""");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo("value\r\n\r\nvalue2\r\n\r\nvalue3"));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Parameter_with_default_value()
        {
            var keyValue = ParameterSection.Parameter.Parse("key=defValue");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo("defValue"));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void MultiLine_key_value_query_plus_parameter()
        {
            var keyValue = ConfigurationParser.MultiLineKeyValue.Parse(
      @"query: ""SELECT
        * 
        FROM workitems
        WHERE
            [System.TeamProject] = @project
            AND [System.WorkItemType] = 'Product Backlog Item'
            AND [System.IterationPath] = '{iterationPath}'""
        queryParameter: test");
            replacedert.That(keyValue.Key, Is.EqualTo("query"));
            replacedert.That(keyValue.Value.Contains("[System.TeamProject] = @project"));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_Parsing_of_array_parameter()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[arrayParameters]]
    tags");
            replacedert.That(def.ArrayParameterSection.ArrayParameters.Count, Is.EqualTo(1));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void MultiLine_key_value_can_contain_semicolon()
        {
            var keyValue = ConfigurationParser.MultiLineKeyValue.Parse(@"key: ""value
value:[with]:semicolon
:value3""");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo("value\r\nvalue:[with]:semicolon\r\n:value3"));
        }

19 View Source File : HtmlAgilityToolkitExtensionTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void SelectivelyRemoveSingleTagWithPrefix()
        {
            var doc = new HtmlDoreplacedent();
            doc.LoadHtml("Prefix<p>paragraph</p><p>multiple</p>");
            doc.RemoveTags(null, "p");

            replacedert.That(doc.DoreplacedentNode.InnerHtml, Is.EqualTo("Prefixparagraphmultiple"));
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Parameter_without_default_value_but_equalSign()
        {
            var keyValue = ParameterSection.Parameter.Parse("key=");
            replacedert.That(keyValue.Key, Is.EqualTo("key"));
            replacedert.That(keyValue.Value, Is.EqualTo(""));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Parsing_two_Sections()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[parameters]]
    parama
    paramb
[[static]]
    filename: bla.txt");
            replacedert.That(def.AllSections.Length, Is.EqualTo(2));
            replacedert.That(def.AllSections[0], Is.InstanceOf<ParameterSection>());
            replacedert.That(def.AllSections[1], Is.InstanceOf<StaticWordSection>());
        }

19 View Source File : SingleSectionParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Parameter_without_default_value_and_other_line_many_parse()
        {
            var keyValue = ParameterSection.Parser.Parse(@"key
otherline");
            replacedert.That(keyValue.Parameters.Count, Is.EqualTo(2));
            replacedert.That(keyValue.Parameters.Keys, Is.EquivalentTo(new[] { "key", "otherline"}));
        }

19 View Source File : WordTemplateTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Verify_correctly_grab_docx_name()
        {
            WordTemplateFolderManager sut = CreateSutForTemplate_1_A();
            var expected = Path.Combine(GetTemplate1AFolder(), "Product Backlog Item.docx");
            replacedert.That(sut.GetTemplateFor("Product Backlog Item"), Is.EqualTo(expected));
        }

19 View Source File : TemplateManagerTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Verify_enumeration_of_templates()
        {
            string templateFolder = GetTemplateFolder("1");
            var sut = new TemplateManager(templateFolder);
            replacedert.That(sut.GetTemplateNames(), Is.EquivalentTo(new[] { "TemplateA", "TemplateB", "TemplateStructure", "TemplateNumbering", }), "Error enumerating template in folder " + templateFolder);
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Valid_query_section()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[query]]
    name: TestQueryName
    query: ""SELECT * FROM WorkItems Where [System.AreaPath] UNDER '{areaPath}' AND [System.IterationPath] UNDER '{iterationPath}'""
    template/Product Backlog Item: pbix.docx
    template/Bug: bugaa.docx
");
            var querySection = def.AllSections.Single() as QuerySection;
            replacedert.That(querySection.Name, Is.EqualTo("TestQueryName"));
            replacedert.That(querySection.Query, Is.EqualTo("SELECT * FROM WorkItems Where [System.AreaPath] UNDER '{areaPath}' AND [System.IterationPath] UNDER '{iterationPath}'"));
        }

19 View Source File : HtmlAgilityToolkitExtensionTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void SelectivelyRemoveSingleTagMaintainInner()
        {
            var doc = new HtmlDoreplacedent();
            doc.LoadHtml("<p>paragraph <strong>strong</strong></p><p>multiple</p>");
            doc.RemoveTags(null, "p");

            replacedert.That(doc.DoreplacedentNode.InnerHtml, Is.EqualTo("paragraph <strong>strong</strong>multiple"));
        }

19 View Source File : WordTemplateTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Verify_scan_folder_grab_name()
        {
            WordTemplateFolderManager sut = CreateSutForTemplate_1_A();
            replacedert.That(sut.Name, Is.EqualTo("TemplateA"));
        }

19 View Source File : WordTemplateTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Verify_grab_docx_name_is_not_case_sensitive()
        {
            WordTemplateFolderManager sut = CreateSutForTemplate_1_A();
            var expected = Path.Combine(GetTemplate1AFolder(), "Product Backlog Item.docx");
            replacedert.That(sut.GetTemplateFor("Product BACKLOG Item"), Is.EqualTo(expected));
        }

19 View Source File : TemplateManagerTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Verify_retrieve_of_template()
        {
            var sut = new TemplateManager(GetTemplateFolder("1"));
            var template = sut.GetWordDefinitionTemplate("TemplateA");
            replacedert.That(template, Is.Not.Null);
            replacedert.That(template.Name, Is.EqualTo("TemplateA"));

            var expected = Path.Combine(GetTemplateFolder("1"), "TemplateA", "Product Backlog Item.docx");
            replacedert.That(template.GetTemplateFor("Product BACKLOG Item"), Is.EqualTo(expected));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Basic_Parsing_of_definition_for_excel_Export()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[definition]]
  type=excel
[[parameters]]
  TargetDateStart=2019-06-01
  TargetDateEnd=2019-10-01
[[parameterDefinition]]");
            replacedert.That(def.Type, Is.EqualTo(TemplateType.Excel));
        }

19 View Source File : BasicParserTests.cs
License : MIT License
Project Creator : alkampfergit

[Test]
        public void Valid_parametric_query()
        {
            var sut = new ConfigurationParser();
            TemplateDefinition def = sut.ParseTemplateDefinition(
@"[[query]]
    query: ""SELECT
        * 
        FROM workitems
        WHERE
            [System.TeamProject] = @project
            AND [System.WorkItemType] = 'Product Backlog Item'
            AND [System.IterationPath] = '{iterationPath}'""
    parameterSet: iterationPath=Zoalord Insurance\Release 1\Sprint 4
    parameterSet: iterationPath=Zoalord Insurance\Release 1\Sprint 5  
    parameterSet: iterationPath=Zoalord Insurance\Release 1\Sprint 6
");
            var querySection = def.AllSections.Single() as QuerySection;
            replacedert.That(querySection.QueryParameters.Count, Is.EqualTo(3));
            replacedert.That(querySection.QueryParameters[0]["iterationPath"], Is.EqualTo(@"Zoalord Insurance\Release 1\Sprint 4"));
            replacedert.That(querySection.QueryParameters[1]["iterationPath"], Is.EqualTo(@"Zoalord Insurance\Release 1\Sprint 5"));
            replacedert.That(querySection.QueryParameters[2]["iterationPath"], Is.EqualTo(@"Zoalord Insurance\Release 1\Sprint 6"));
        }

See More Examples