Beispiel #1
0
        /// <summary>
        /// Reconstitutes the project file from the given path and populates the
        /// application with the referenced items.
        /// </summary>
        /// <param name="fileName">The path of the project containing the desired
        /// project.</param>
        private void LoadProjectFile(string fileName)
        {
            var           serializer = new JesterProjectSerializer();
            JesterProject project    = serializer.Deserialize(fileName);

            targetAssemblyTreeView.LoadAssemblies(new[] { project.TargetAssemblyPath });

            _shadowedTargetAssembly = Utilities.ShadowCopyAssembly(project.TargetAssemblyPath);
            _shadowedTestAssembly   = Utilities.ShadowCopyAssembly(project.TestAssemblyPath);
        }
        public void Can_reconstitute_a_saved_project_from_disk()
        {
            string sampleProjectFile =
                Utility.CopyToDisk(ExtractResourceAttribute.Stream);

            JesterProjectSerializer serializer = new JesterProjectSerializer();
            JesterProject project = serializer.Deserialize(sampleProjectFile);

            Assert.AreEqual(Path.GetFileName(project.TargetAssemblyPath), "AnimalFarm.dll",
                "The expected value for the target assembly was not found.");
            Assert.AreEqual(Path.GetFileName(project.TestAssemblyPath), "AnimalFarm.Tests.dll",
                "The expected value for the test assembly was not found.");
        }
Beispiel #3
0
        public void Can_reconstitute_a_saved_project_from_disk()
        {
            string sampleProjectFile =
                Utility.CopyToDisk(ExtractResourceAttribute.Stream);

            JesterProjectSerializer serializer = new JesterProjectSerializer();
            JesterProject           project    = serializer.Deserialize(sampleProjectFile);

            Assert.AreEqual(Path.GetFileName(project.TargetAssemblyPath), "AnimalFarm.dll",
                            "The expected value for the target assembly was not found.");
            Assert.AreEqual(Path.GetFileName(project.TestAssemblyPath), "AnimalFarm.Tests.dll",
                            "The expected value for the test assembly was not found.");
        }
Beispiel #4
0
        /// <summary>
        /// Reconstitutes the project file from the given path and populates the 
        /// application with the referenced items. 
        /// </summary>
        /// <param name="fileName">The path of the project containing the desired 
        /// project.</param>
        private void LoadProjectFile(string fileName)
        {
            var serializer = new JesterProjectSerializer();
            JesterProject project = serializer.Deserialize(fileName);

            targetAssemblyTreeView.LoadAssemblies(new[] {project.TargetAssemblyPath});

            _shadowedTargetAssembly = Utilities.ShadowCopyAssembly(project.TargetAssemblyPath);
            _shadowedTestAssembly = Utilities.ShadowCopyAssembly(project.TestAssemblyPath);
        }