public void CheckDotNotation() { bool isUpdated = false; string beforeText = "{% for group in GroupType.Groups %}{% for location in group.Locations %}{% for schedule in location.Schedules %}{{schedule.Name}}{% endfor %}{% endfor %}{% endfor %}"; string expectedText = "{% for group in GroupType.Groups %}{% for location in group.Locations %}{% for schedule in location.Schedules %}{{schedule.Name}}{% endfor %}{% endfor %}{% endfor %}"; LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater(); string afterText = legacyLavaUpdater.ReplaceDotNotation(beforeText, ref isUpdated); Assert.Equal(expectedText, afterText); }
public void CheckDotNotationPartialMatches() { bool isUpdated = false; string beforeText = "<p>{{ Workflow.ReportedBy }},</p>"; string expectedText = "<p>{{ Workflow | Attribute:'ReportedBy' }},</p>"; LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater(); string afterText = legacyLavaUpdater.ReplaceDotNotation(beforeText, ref isUpdated); Assert.Equal(expectedText, afterText); }