Beispiel #1
0
        public void TestLabelCreation()
        {
            // TODO At the moment this test is not working due the MetaModelService

            Labeling.LabelManager labelManger = new Labeling.LabelManager();
            Random random = new Random();

            string propertyText = string.Empty;

            // Using GUID values as random strings
            string randomText1;
            string randomtext2;

            for (int i = 0; i < random.Next(30, 300); i++)
            {
                randomText1 = Guid.NewGuid().ToString("D");
                randomtext2 = Guid.NewGuid().ToString("D");

                if ((i % 2) == 0)
                {
                    propertyText = $"@@@{randomText1.Replace("-", " ")}={randomtext2}";
                }
                else
                {
                    if ((i % 3) == 0)
                    {
                        propertyText = $"@@@{randomText1.Replace("-", string.Empty)}={randomtext2}";
                    }
                    else
                    {
                        propertyText = $"@@@{randomText1.Replace("-", " ")}";
                    }
                }


                labelManger.createLabel(propertyText);

                Assert.IsTrue(labelManger.exist(Labeling.LabelManager.getLabelId(propertyText), "LabelFileJYL_en-GB"));
            }
        }
Beispiel #2
0
 /// <summary>
 /// Initialize class
 /// </summary>
 public CreateLabels()
 {
     labelManager = new Labeling.LabelManager();
 }