示例#1
0
        public void TestAddAlias()
        {
            AliasGroup aliasGroup = new AliasGroup("en", new HashSet<string> { "foo", "bar" });
            aliasGroup.Aliases.Add("baz");

            Assert.Equal(3, aliasGroup.Aliases.Count);
            Assert.True(aliasGroup.Aliases.Contains("baz"));
        }
示例#2
0
        public void TestRemoveAlias()
        {
            AliasGroup aliasGroup = new AliasGroup("en", new HashSet<string> { "foo", "bar" });
            aliasGroup.Aliases.Remove("bar");

            Assert.Equal(1, aliasGroup.Aliases.Count);
            Assert.False(aliasGroup.Aliases.Contains("bar"));
        }
示例#3
0
        public void TestAliasGroup()
        {
            AliasGroup aliasGroup = new AliasGroup("en", new HashSet<string> { "foo", "bar" });

            Assert.Equal("en", aliasGroup.Language);
            Assert.Equal(2, aliasGroup.Aliases.Count);
            Assert.True(aliasGroup.Aliases.Contains("foo"));
            Assert.True(aliasGroup.Aliases.Contains("bar"));
        }