Example #1
0
        public void Find_returns_expected_when_no_commands_are_registered()
        {
            var sut    = new DefaultCommandRegistry();
            var result = sut.Find("foo");

            Assert.Null(result);
        }
Example #2
0
        public void Find_returns_expected_command_when_direct_match()
        {
            var expected = typeof(FooCommand);
            var sut      = new DefaultCommandRegistry();

            sut.Register(expected);

            var result = sut.Find("Foo");

            Assert.Equal(expected, result);
        }
Example #3
0
        public void Find_is_case_insensitive()
        {
            var expected = typeof(FooCommand);
            var sut      = new DefaultCommandRegistry();

            sut.Register(expected);

            var result = sut.Find("foo");

            Assert.Equal(expected, result);
        }