Ejemplo n.º 1
0
        public void NewConfigurationsHaveAnAssemblyName()
        {
            DotNetProject p = new DotNetAssemblyProject("C#");

            p.Name = "HiThere";
            DotNetProjectConfiguration c = (DotNetProjectConfiguration)p.CreateConfiguration("First");

            Assert.AreEqual("HiThere", c.OutputAssembly);
        }
Ejemplo n.º 2
0
        public void CustomCommands()
        {
            DotNetProject p = new DotNetAssemblyProject("C#");

            p.Name = "SomeProject";
            DotNetProjectConfiguration c = (DotNetProjectConfiguration)p.CreateConfiguration("First");

            CustomCommand cmd = new CustomCommand();

            cmd.Command = "aa bb cc";
            Assert.AreEqual("aa", cmd.GetCommandFile(p, c.Selector));
            Assert.AreEqual("bb cc", cmd.GetCommandArgs(p, c.Selector));

            cmd.Command = "\"aa bb\" cc dd";
            Assert.AreEqual("aa bb", cmd.GetCommandFile(p, c.Selector));
            Assert.AreEqual("cc dd", cmd.GetCommandArgs(p, c.Selector));

            cmd.Command = "\"aa ${ProjectName}\" cc ${ProjectName}";
            Assert.AreEqual("aa SomeProject", cmd.GetCommandFile(p, c.Selector));
            Assert.AreEqual("cc SomeProject", cmd.GetCommandArgs(p, c.Selector));

            cmd.WorkingDir = NormalizePath("/some/${ProjectName}/place");
            Assert.AreEqual(Path.GetFullPath(NormalizePath("/some/SomeProject/place")), (string)cmd.GetCommandWorkingDir(p, c.Selector));
        }
Ejemplo n.º 3
0
		public void CustomCommands ()
		{
			DotNetProject p = new DotNetAssemblyProject ("C#");
			p.Name = "SomeProject";
			DotNetProjectConfiguration c = (DotNetProjectConfiguration) p.CreateConfiguration ("First");
			
			CustomCommand cmd = new CustomCommand ();
			cmd.Command = "aa bb cc";
			Assert.AreEqual ("aa", cmd.GetCommandFile (p, c.Selector));
			Assert.AreEqual ("bb cc", cmd.GetCommandArgs (p, c.Selector));
			
			cmd.Command = "\"aa bb\" cc dd";
			Assert.AreEqual ("aa bb", cmd.GetCommandFile (p, c.Selector));
			Assert.AreEqual ("cc dd", cmd.GetCommandArgs (p, c.Selector));
			
			cmd.Command = "\"aa ${ProjectName}\" cc ${ProjectName}";
			Assert.AreEqual ("aa SomeProject", cmd.GetCommandFile (p, c.Selector));
			Assert.AreEqual ("cc SomeProject", cmd.GetCommandArgs (p, c.Selector));
			
			cmd.WorkingDir = NormalizePath ("/some/${ProjectName}/place");
			Assert.AreEqual (Path.GetFullPath (NormalizePath ("/some/SomeProject/place")), (string)cmd.GetCommandWorkingDir (p, c.Selector));
		}
Ejemplo n.º 4
0
		public void NewConfigurationsHaveAnAssemblyName ()
		{
			DotNetProject p = new DotNetAssemblyProject ("C#");
			p.Name = "HiThere";
			DotNetProjectConfiguration c = (DotNetProjectConfiguration) p.CreateConfiguration ("First");
			Assert.AreEqual ("HiThere", c.OutputAssembly);
		}