public void getPropertyTest() { var mockDte2 = new Mock<EnvDTE80.DTE2>(); var mockSolution = new Mock<EnvDTE.Solution>(); var mockSolutionBuild = new Mock<EnvDTE.SolutionBuild>(); var mockSolutionConfiguration2 = new Mock<EnvDTE80.SolutionConfiguration2>(); mockSolutionConfiguration2.SetupGet(p => p.Name).Returns("Release"); mockSolutionConfiguration2.SetupGet(p => p.PlatformName).Returns("x86"); mockSolutionBuild.SetupGet(p => p.ActiveConfiguration).Returns(mockSolutionConfiguration2.Object); mockSolution.SetupGet(p => p.SolutionBuild).Returns(mockSolutionBuild.Object); mockDte2.SetupGet(p => p.Solution).Returns(mockSolution.Object); vsSBE.MSBuild.Parser target = new Parser(new net.r_eg.vsSBE.Environment(mockDte2.Object)); Assert.IsNotNull(target.getProperty("Configuration")); Assert.IsNotNull(target.getProperty("Platform")); }
public void parseVariablesSBETest4() { vsSBE.MSBuild.Parser target = new Parser(new net.r_eg.vsSBE.Environment((DTE2)null)); string expected = String.Empty; string actual = target.parseVariablesSBE("$(name)", "name", null); Assert.AreEqual(expected, actual); }
public void parseTest12() { vsSBE.MSBuild.Parser target = new Parser(new net.r_eg.vsSBE.Environment((DTE2)null)); string actual = target.parse("$$(Path.Replace('\', '/'):project)"); string expected = "$(Path.Replace('\', '/'):project)"; Assert.AreEqual(expected, actual); }
public void parseTest1() { vsSBE.MSBuild.Parser target = new Parser(new net.r_eg.vsSBE.Environment((DTE2)null)); string actual = target.parse("FooBar"); string expected = "FooBar"; Assert.AreEqual(expected, actual); }