private string GetNormalizedObjectId(string objectId)
        {
            var match = TestDataNormalizer.objectIdentityRegex.Match(objectId);

            if (match.Success)
            {
                string type   = match.Groups["type"].Value;
                string base64 = match.Groups["base64"].Value;

                List <Guid> decodedGuids = TestDataNormalizer.GetDecodedBase64Guids(base64);

                string result     = "type=" + type + ", guids=";
                bool   needsComma = false;
                foreach (var guid in decodedGuids)
                {
                    if (needsComma)
                    {
                        result += ", ";
                    }

                    result    += this.GetNormalizedGuid(guid);
                    needsComma = true;
                }

                return("[" + result + "]");
            }
            return(objectId);
        }
Пример #2
0
        public static void ClassInitialize(TestContext context)
        {
            SampleData.DetectTermStore();

            FunctionalTests.testDataNormalizer             = new TestDataNormalizer();
            FunctionalTests.testDataNormalizer.TermStoreId = SampleData.TermStoreId;

            FunctionalTests.testDataFile = new TestDataFile(@"..\..\FunctionalTests.xml",
                                                            FunctionalTests.testDataNormalizer);

#if OVERWRITE_OUTPUT
            ShouldOverwriteOutput = true;
#endif
        }