public void When_already_prepared_return_null()
        {
            var document = new ProjectDocument(ProjectType.CSharp);

            document.HasBeenReadFromFile();
            var record  = new Project("someproject", document);
            var project = _preparer.Prepare(record);

            project.ShouldBeTheSameAs(record);
        }
Ejemplo n.º 2
0
 public void SetUp()
 {
     _firstDocument = new ProjectDocument(ProjectType.CSharp);
     _firstDocument.HasBeenReadFromFile();
     _secondDocument = new ProjectDocument(ProjectType.CSharp);
     _secondDocument.HasBeenReadFromFile();
     _parser        = new FakeProjectParser(new ProjectDocument[] { _secondDocument, _firstDocument });
     _cache         = new Cache(new FakeServiceLocator(_parser, delegate { return(_cache); }));
     _testProject   = Path.GetFullPath(string.Format("TestResources{0}VS2008{0}CSharpNUnitTestProject.csproj", Path.DirectorySeparatorChar));
     _testProjectVB = Path.GetFullPath(string.Format("TestResources{0}VS2008{0}NUnitTestProjectVisualBasic.vbproj", Path.DirectorySeparatorChar));
 }
Ejemplo n.º 3
0
 public void When_calling_HasBeenReadFromFile_IsReadFromFile_should_be_true()
 {
     _document.IsReadFromFile.ShouldBeFalse();
     _document.HasBeenReadFromFile();
     _document.IsReadFromFile.ShouldBeTrue();
 }