public void ThrowsForNullName() { // Given IShortcodeCollection shortcodes = new ShortcodeCollection(); // When, Then Should.Throw <ArgumentException>(() => shortcodes.Add <TestShortcode>(null)); }
public void ThrowsForWhiteSpaceInName() { // Given IShortcodeCollection shortcodes = new ShortcodeCollection(); // When, Then Should.Throw <ArgumentException>(() => shortcodes.Add <TestShortcode>(" xyz ")); }
public void IgnoresCase() { // Given IShortcodeCollection shortcodes = new ShortcodeCollection(); shortcodes.Add <TestShortcode>("Foo"); // When IShortcode shortcode = shortcodes.CreateInstance("foo"); // Then shortcode.ShouldBeAssignableTo <TestShortcode>(); }