コード例 #1
0
        public void DefinedFriendlyNamesAreAvailable()
        {
            StandardCommandMap cm = new StandardCommandMap();

            cm.Load(@"Commands\commandmap.Simple.xml");

            Assert.Equal("FriendlyIncludedCommand", cm.GetFriendlyName("IncludedCommand"));
            Assert.Equal("FriendlyCommandWithMissingInclude", cm.GetFriendlyName("CommandWithMissingInclude"));
        }
コード例 #2
0
        public void DefaultFriendlyNamesIfUnspecified()
        {
            StandardCommandMap cm = new StandardCommandMap();

            cm.Load(@"Commands\commandmap.Simple.xml");

            Assert.Equal("CommandWithMissingFriendly", cm.GetFriendlyName("CommandWithMissingFriendly"));
        }
コード例 #3
0
        public void WhitespacesInFriendlyNameAreTrimmed()
        {
            StandardCommandMap cm = new StandardCommandMap();

            cm.Load(@"Commands\commandmap.Simple.xml");

            Assert.Equal("FriendlyNameWithWhitespaces", cm.GetFriendlyName("CommandWithNonstandardFriendly"));
        }