public string CreateSpecs() { SpecCount = new TaskItem("0"); int specCount; var config = new ProviderConfig { BaseDirectory = BaseDirectory, Extensions = Extensions, Log = Log, MyNamespace = GetType().Namespace, TargetNamespace = Namespace ?? (string.IsNullOrWhiteSpace(ProjectDir) ? GetType().Namespace : (new DirectoryInfo(ProjectDir).Name)), Pattern = Pattern }; var provider = GetProvider(config); var result = provider.CreateSpecs(out specCount); SpecCount = new TaskItem(specCount.ToString()); return result; }
protected NUnitCodeProvider(ProviderConfig config) { this.config = config; }
public VisualBasicNUnitProvider(ProviderConfig config) : base(config) { }
NUnitCodeProvider GetProvider(ProviderConfig config) { var language = (Language ?? string.Empty); switch (language) { case "C#": return new CSharpNUnitProvider(config); case "VB": return new VisualBasicNUnitProvider(config); default: throw new Exception("Language not recognised, supported languages : C# & VB"); } }
public CSharpNUnitProvider(ProviderConfig config) : base(config) { }