public void CanRemoveAbbreviation()
        {
            _writingSystem.ISO          = "en";
            _writingSystem.Abbreviation = "abbrev";
            _writingSystemRepository.StoreDefinition(_writingSystem);
            string path = _writingSystemRepository.PathToWritingSystem(_writingSystem);

            AssertXmlFile.AtLeastOneMatch(path, "ldml/special/palaso:abbreviation", LdmlAdaptor.MakeNameSpaceManager());
            _writingSystem.Abbreviation = string.Empty;
            _writingSystemRepository.StoreDefinition(_writingSystem);
            TestUtilities.AssertXPathIsNull(PathToWS, "ldml/special/palaso:abbreviation", LdmlAdaptor.MakeNameSpaceManager());
        }
 public void WritesAbbreviationToLDML()
 {
     _writingSystem.ISO          = "blah";
     _writingSystem.Abbreviation = "bl";
     _writingSystemRepository.StoreDefinition(_writingSystem);
     AssertXmlFile.AtLeastOneMatch(PathToWS, "ldml/special/palaso:abbreviation[@value='bl']", LdmlAdaptor.MakeNameSpaceManager());
 }
        public void CanSetVariantToExistingLDML()
        {
            _writingSystem.ISO          = "blah";
            _writingSystem.Abbreviation = "bl";            //crucially, abbreviation isn't part of the name of the file
            _writingSystemRepository.StoreDefinition(_writingSystem);

            //here, the task is not to overwrite what was in ther already
            WritingSystemDefinition ws2 = new WritingSystemDefinition();

            ws2         = _writingSystemRepository.LoadDefinition("blah");
            ws2.Variant = "piglatin";
            _writingSystemRepository.StoreDefinition(ws2);
            string path = Path.Combine(_writingSystemRepository.PathToWritingSystems, _writingSystemRepository.GetFileName(ws2));

            AssertXmlFile.AtLeastOneMatch(path, "ldml/identity/variant[@type='piglatin']");
            AssertXmlFile.AtLeastOneMatch(path, "ldml/special/palaso:abbreviation[@value='bl']", LdmlAdaptor.MakeNameSpaceManager());
        }