public void ShouldReturnExistingItem() { // Arrange var solutionManager = new MockSolutionManagerBuilder(new MockProject("myProj", new MockFolder("someFolder", new MockFolder("childFolder", new MockItem("someFile.ext")) ) )).Build(); // Act var results = new GetProjectItemCmdlet(solutionManager) { Path = "someFolder\\childFolder\\someFile.ext" }.GetResults<ProjectItem>(); // Assert Assert.AreEqual("someFile.ext", results.Single().Name); }
public void ShouldBeAbleToSpecifyArbitraryProjectName() { // Arrange var solutionManager = new MockSolutionManagerBuilder( new MockProject("firstProj"), new MockProject("secondProj", new MockItem("someFile.ext")) ).Build(); // Act var results = new GetProjectItemCmdlet(solutionManager) { Path = "someFile.ext", Project = "secondProj" }.GetResults<ProjectItem>(); // Assert Assert.AreEqual("someFile.ext", results.Single().Name); }