public void GetItem_ReturnsNotFound_WhenNestedDirectoryDoesNotExist() { // Arrange var projectSystem = new VirtualRazorProjectFileSystem(); // Act var actual = projectSystem.GetItem("/subDirectory/dir3/file.cshtml", fileKind: null); // Assert Assert.False(actual.Exists); }
public void GetItem_ReturnsItemAddedToNestedDirectory(string path) { // Arrange var projectSystem = new VirtualRazorProjectFileSystem(); var projectItem = new TestRazorProjectItem(path); // Act projectSystem.Add(projectItem); var actual = projectSystem.GetItem(path, fileKind: null); // Assert Assert.Same(projectItem, actual); }
public void GetItem_ReturnsNotFound_IfFileDoesNotExistInRoot() { // Arrange var path = "/root-file.cshtml"; var projectSystem = new VirtualRazorProjectFileSystem(); // Act projectSystem.Add(new TestRazorProjectItem("/different-file.cshtml")); var result = projectSystem.GetItem(path, fileKind: null); // Assert Assert.False(result.Exists); }
public void GetItem_ReturnsItemAddedToRoot() { // Arrange var path = "/root-file.cshtml"; var projectSystem = new VirtualRazorProjectFileSystem(); var projectItem = new TestRazorProjectItem(path); // Act projectSystem.Add(projectItem); var actual = projectSystem.GetItem(path, fileKind: null); // Assert Assert.Same(projectItem, actual); }