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 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); }