public void GetDataFolder_WhenGivenDataFolderPath_ReturnsDataFolderPath() { string path = Path.Combine(TestDataLocator.GetMinecraftDataPath(), "data"); string resultPath = DataFolderHelper.GetDataFolder(path); Assert.Equal(path, resultPath); }
public void GetDataFolder_WhenGivenRepoPath_ReturnsDataFolderPath() { string path = TestDataLocator.GetMinecraftDataPath(); string resultPath = DataFolderHelper.GetDataFolder(path); Assert.Equal("data", resultPath.Split(Path.DirectorySeparatorChar).Last()); }
public void GetDataFolder_WhenGivenInvalidPath_ThrowsException() { string path = Path.GetDirectoryName(TestDataLocator.GetMinecraftDataPath()); Assert.Throws <InvalidDataPathException>(() => DataFolderHelper.GetDataFolder(path)); }
public void GetDataFolder_WhenGivenNullPath_ThrowsException() { Assert.Throws <ArgumentNullException>(() => DataFolderHelper.GetDataFolder(null)); }