예제 #1
0
        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;
        }
예제 #2
0
 protected NUnitCodeProvider(ProviderConfig config)
 {
     this.config = config;
 }
 public VisualBasicNUnitProvider(ProviderConfig config)
     : base(config)
 {
 }
예제 #4
0
 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");
     }
 }
예제 #5
0
 public CSharpNUnitProvider(ProviderConfig config)
     : base(config)
 {
 }