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 async Task GetVersionsForPlatformAsync_GivenPcPlatform_ReturnsVersions()
        {
            var sut = new MinecraftDataReader(TestDataLocator.GetMinecraftDataPath());

            var result = (await sut.GetVersionsForPlatformAsync(MinecraftPlatform.Pc)).ToList();

            Assert.NotEmpty(result);
            Assert.Contains(new MinecraftVersion("1.11.2"), result);
        }
        public void GetDataFolder_WhenGivenInvalidPath_ThrowsException()
        {
            string path = Path.GetDirectoryName(TestDataLocator.GetMinecraftDataPath());

            Assert.Throws <InvalidDataPathException>(() => DataFolderHelper.GetDataFolder(path));
        }
        private static async Task <VersionDefinition> GetDefinitionsForVersion()
        {
            var sut = new MinecraftDataReader(TestDataLocator.GetMinecraftDataPath());

            return(await sut.GetDefinitionForVersionAsnyc(MinecraftPlatform.Pc, new MinecraftVersion("1.9.2")));
        }
        public void MinecraftDataExists()
        {
            string path = TestDataLocator.GetMinecraftDataPath();

            Assert.NotNull(path);
        }