Esempio n. 1
0
 public void SetupProject_WithFilename_ShouldLoadThatFile()
 {
     CogProject project = GetTestProject();
     string filename = Path.GetTempFileName();
     try
     {
         SaveProject(project, filename);
         var options = new VerbBase();
         options.ConfigFilename = filename;
         options.SetUpProject();
         CheckHasTestFeature(options.Project);
         Assert.That(options.Project.FeatureSystem.Count, Is.EqualTo(18));
     }
     finally
     {
         File.Delete(filename);
     }
 }
Esempio n. 2
0
 public void SetupProject_WithXmlString_ShouldLoadThatXml()
 {
     CogProject project = GetTestProject();
     string filename = Path.GetTempFileName();
     try
     {
         SaveProject(project, filename);
         string xmlString = File.ReadAllText(filename, Encoding.UTF8);
         var options = new VerbBase();
         options.ConfigData = xmlString;
         options.SetUpProject();
         CheckHasTestFeature(options.Project);
         Assert.That(options.Project.FeatureSystem.Count, Is.EqualTo(18));
     }
     finally
     {
         File.Delete(filename);
     }
 }
Esempio n. 3
0
 public void SetupProject_WithNoConfigFile_ShouldLoadDefaultProject()
 {
     var options = new VerbBase();
     options.SetUpProject();
     CheckDoesNotHaveTestFeature(options.Project);
     Assert.That(options.Project.FeatureSystem.Count, Is.EqualTo(17));
 }