Exemplo n.º 1
0
        public void RemoveFromVariant_VariantContainsStringToRemoveAndStringToRemoveStartsWithUnderscore_StringIsNotRemoved()
        {
            var rfcTag = new RFC5646Tag("en", String.Empty, String.Empty, "biske", String.Empty);

            rfcTag.RemoveFromVariant("_biske");
            Assert.AreEqual("biske", rfcTag.Variant);
        }
Exemplo n.º 2
0
        public void RemoveFromVariant_VariantContainsStringToRemoveAndStringToRemoveEndsWithDash_StringIsRemoved()
        {
            var rfcTag = new RFC5646Tag("en", String.Empty, String.Empty, "biske", String.Empty);

            rfcTag.RemoveFromVariant("biske-");
            Assert.AreEqual(rfcTag.Variant, String.Empty);
        }
Exemplo n.º 3
0
        public void RemoveFromVariant_VariantContainsStringToRemoveInDifferentCase_VariantIsStrippedOfStringToRemoveAndPrecedingDash()
        {
            var rfcTag = new RFC5646Tag("en", String.Empty, String.Empty, "1901-BisKe", String.Empty);

            rfcTag.RemoveFromVariant("biske");
            Assert.AreEqual("1901", rfcTag.Variant);
        }
Exemplo n.º 4
0
        public void RemoveFromVariant_VariantEqualsStringToRemoveInDifferentCase_VariantIsEmpty()
        {
            var rfcTag = new RFC5646Tag("en", String.Empty, String.Empty, "bIsKe", String.Empty);

            rfcTag.RemoveFromVariant("biske");
            Assert.AreEqual(String.Empty, rfcTag.Variant);
        }
Exemplo n.º 5
0
        public void RemoveFromVariant_VariantContainsPartsOfStringToRemoveButNotConsecutively_RemovesPartsCorrectly()
        {
            var rfcTag = new RFC5646Tag("en", String.Empty, String.Empty, "1901-bauddha-biske", String.Empty);

            rfcTag.RemoveFromVariant("1901-biske");
            Assert.AreEqual("bauddha", rfcTag.Variant);
        }
Exemplo n.º 6
0
        public void RemoveFromVariant_VariantDoesNotContainPartsOfStringToRemove_PartsThatAreContainedAreRemoved()
        {
            var rfcTag = new RFC5646Tag("en", String.Empty, String.Empty, "1901-bauddha", String.Empty);

            rfcTag.RemoveFromVariant("biske-1901");
            Assert.AreEqual("bauddha", rfcTag.Variant);
        }
Exemplo n.º 7
0
        public void RemoveFromVariant_VariantDoesNotContainStringToRemove_VariantRemainsUntouched()
        {
            var rfcTag = new RFC5646Tag("en", String.Empty, String.Empty, "1901", String.Empty);

            rfcTag.RemoveFromVariant("biske");
            Assert.AreEqual("1901", rfcTag.Variant);
        }
Exemplo n.º 8
0
        public void RemoveFromVariant_VariantIsEmpty_VariantRemainsUntouched()
        {
            var rfcTag = new RFC5646Tag("en", String.Empty, String.Empty, String.Empty, String.Empty);

            rfcTag.RemoveFromVariant("biske");
            Assert.AreEqual(String.Empty, rfcTag.Variant);
        }
Exemplo n.º 9
0
        public void RemoveFromVariant_StringToRemoveInDifferentCaseIsFirstInVariant_VariantIsStrippedOfStringToRemoveAndFollowingDash()
        {
            var rfcTag = new RFC5646Tag("en", String.Empty, String.Empty, "bIsKe-1901", String.Empty);

            rfcTag.RemoveFromVariant("biske");
            Assert.AreEqual("1901", rfcTag.Variant);
        }