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")); }
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")); }
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")); }