public void UpdateLegacyLava() { LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater(); legacyLavaUpdater.FindLegacyLava(); Assert.That.Empty(legacyLavaUpdater.SQLUpdateScripts); }
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 ReplaceUrlOnNonLavaString() { LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater(); bool isUpdated = false; string beforeText = @"This should not get changed query_strings_from_url {{ Person | Attribute: ''Facebook'', ''Url'' }}"; string afterText = legacyLavaUpdater.ReplaceUrl(beforeText, ref isUpdated); Assert.Equal(beforeText, 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); }
public void ReplaceMultipleUrlOnLavaString() { LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater(); bool isUpdated = false; string beforeText = "<p>_url Legacy Lava {{ Person.Facebook_url }} {{ Person.Twitter_url }} {{ Person.SnapChat_url }} {{ Person.Instagram_url }} Legacy Lava </p>"; string expectedText = "<p>_url Legacy Lava {{ Person.Facebook,'Url' }} {{ Person.Twitter,'Url' }} {{ Person.SnapChat,'Url' }} {{ Person.Instagram,'Url' }} Legacy Lava </p>"; string afterText = legacyLavaUpdater.ReplaceUrl(beforeText, ref isUpdated); Assert.Equal(expectedText, afterText); }
public void ReplaceUrlOnLavaString() { LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater(); bool isUpdated = false; string beforeText = "<p>_url Legacy Lava {{ Person.Facebook_url }} Legacy Lava </p>"; string expectedText = "<p>_url Legacy Lava {{ Person.Facebook,'Url' }} Legacy Lava </p>"; string afterText = legacyLavaUpdater.ReplaceUrl(beforeText, ref isUpdated); Assert.That.Equal(expectedText, afterText); }
public void UpdateLegacyLavaFiles() { LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater(); legacyLavaUpdater.FindLegacyLavaInFiles(); }
public void CheckSystemEmail() { LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater(); legacyLavaUpdater.CheckSystemEmail(); }