public void The_Load_Method_Loads_Namespaces_Correctly()
        {
            ProjectDeserialiserV1 deserialiser = new ProjectDeserialiserV1(fileController);
            IDesignerProject project = MockRepository.GenerateMock<IDesignerProject>();

            deserialiser.ReadProject(ExpectedXml.GetXmlDocRoot(), project, "Folder\\Project.aad");

            project.AssertWasCalled(p => p.AddNamespace(Arg<string>.Is.Equal("Ns1")));
        }
        public void The_Load_Method_Loads_ReferencedFiles_Correctly()
        {
            ProjectDeserialiserV1 deserialiser = new ProjectDeserialiserV1(fileController);
            IDesignerProject project = new ProjectBase(); //MockRepository.GenerateStub<IDesignerProject>();

            deserialiser.ReadProject(ExpectedXml.GetXmlDocRoot(), project, "Folder\\Project.aad");

            Assert.That(project.References, Has.Count(1));

            Assert.That(project.References[0].FileName, Is.EqualTo("Folder\\file.dll"));
            Assert.That(project.References[0].MergeWithAssembly, Is.True);
            Assert.That(project.References[0].UseInWorkbench, Is.True);
        }
        public void The_Load_Method_Creates_The_Correct_Project()
        {
            ProjectDeserialiserV1 deserialiser = new ProjectDeserialiserV1(fileController);
            IDesignerProject project = MockRepository.GenerateMock<IDesignerProject>();

            deserialiser.ReadProject(ExpectedXml.GetXmlDocRoot(), project, "Folder\\Project.aad");

            project.AssertWasCalled(p => p.ProjectName = "Test");
            project.AssertWasCalled(p => p.ProjectDescription = "Desc");
            project.AssertWasCalled(p => p.CompileFolderName = "Folder\\temp-compile"); // This should be the absolute path.
            project.AssertWasCalled(p => p.Version = "1.2.3.2.1");
            project.AssertWasCalled(p => p.ProjType = ProjectTypes.None);
            project.AssertWasCalled(p => p.DebugProjectFile = "Folder\\debug.wbproj"); // Absolute path
            project.AssertWasCalled(p => p.TestGenerateDirectory = "Folder\\test gen"); // Absolute path
        }