Beispiel #1
0
            public void ThrowsForNullName()
            {
                // Given
                IShortcodeCollection shortcodes = new ShortcodeCollection();

                // When, Then
                Should.Throw <ArgumentException>(() => shortcodes.Add <TestShortcode>(null));
            }
Beispiel #2
0
            public void ThrowsForWhiteSpaceInName()
            {
                // Given
                IShortcodeCollection shortcodes = new ShortcodeCollection();

                // When, Then
                Should.Throw <ArgumentException>(() => shortcodes.Add <TestShortcode>("  xyz  "));
            }
Beispiel #3
0
            public void IgnoresCase()
            {
                // Given
                IShortcodeCollection shortcodes = new ShortcodeCollection();

                shortcodes.Add <TestShortcode>("Foo");

                // When
                IShortcode shortcode = shortcodes.CreateInstance("foo");

                // Then
                shortcode.ShouldBeAssignableTo <TestShortcode>();
            }