public void each_interface_name_starts_with_capital_I() { var interfaces = ConventionsHelper.GetAllAssemblies().GetInterfaces(); var invalidNameInterfaces = interfaces.Where(t => t.Name.StartsWith("I") == false); invalidNameInterfaces.ShouldBeEmpty(); }
public void each_interface_has_at_least_one_implementation() { var interfaces = ConventionsHelper.GetAllAssemblies().GetInterfaces(); var concreteTypes = ConventionsHelper.GetAllAssemblies().GetClasses().Where(x => x.IsAbstract == false) .ToList(); foreach (var @interface in interfaces) { concreteTypes.Any(x => @interface.IsAssignableFrom(x)).ShouldBeTrue(); } }