예제 #1
0
        public void UpdateLegacyLava()
        {
            LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater();

            legacyLavaUpdater.FindLegacyLava();

            Assert.That.Empty(legacyLavaUpdater.SQLUpdateScripts);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        public void UpdateLegacyLavaFiles()
        {
            LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater();

            legacyLavaUpdater.FindLegacyLavaInFiles();
        }
예제 #8
0
        public void CheckSystemEmail()
        {
            LegacyLavaUpdater legacyLavaUpdater = new LegacyLavaUpdater();

            legacyLavaUpdater.CheckSystemEmail();
        }