public void Should_create_class_command_from_type() { ClassCommandFactory.CreateFromType(typeof(ClassCommand1)) .ShouldBeEquivalentTo <ICommand>(new { Name = "class_command_1", IsDefault = false, Group = "ClassCommands", Description = "Class command 1" }); }
public static IEnumerable <ICommand> FindClassCommands(Assembly assembly) { return((from t in assembly.DefinedTypes where !t.IsAbstract && CommmandInstanceType.IsAssignableFrom(t) select ClassCommandFactory.CreateFromType(t)).ToArray()); }