コード例 #1
0
        public void Can_save_test_assembly_path_in_project_file()
        {
            JesterProject project =
                new JesterProject("targetAssembly.dll", "testAssembly.dll");

            Assert.AreEqual("testAssembly.dll", project.TestAssemblyPath);
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: Milstein/JesterDotNet
        /// <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);
        }
コード例 #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.");
        }
コード例 #4
0
        public void Can_save_project_to_disk()
        {
            JesterProject project =
                new JesterProject("targetAssembly.dll", "testAssembly.dll");

            string savedFile = Path.GetTempFileName();

            JesterProjectSerializer serializer = new JesterProjectSerializer();

            serializer.Serialize(project, savedFile);

            FileAssert.Exists(savedFile);
        }