Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Created Jastusa Metadata Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Aug 10, 2020
1 parent 02f60a6 commit bef1b33
Show file tree
Hide file tree
Showing 12 changed files with 677 additions and 0 deletions.
1 change: 1 addition & 0 deletions Extensions.Test/Extensions.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<ProjectReference Include="..\DLSiteMetadata\DLSiteMetadata.csproj" />
<ProjectReference Include="..\Extensions.Common\Extensions.Common.csproj" />
<ProjectReference Include="..\F95ZoneMetadata\F95ZoneMetadata.csproj" />
<ProjectReference Include="..\JastusaMetadata\JastusaMetadata.csproj" />
<ProjectReference Include="..\VNDBMetadata\VNDBMetadata.csproj" />
</ItemGroup>

Expand Down
55 changes: 55 additions & 0 deletions Extensions.Test/JastusaTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// /*
// Copyright (C) 2020 erri120
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// */

using System;
using System.Threading.Tasks;
using JastusaMetadata;
using Playnite.SDK;
using Xunit;
using Xunit.Abstractions;

namespace Extensions.Test
{
public class JastusaTest : IClassFixture<LoggerFixture>
{
private readonly ILogger _logger;

public JastusaTest(LoggerFixture fixture, ITestOutputHelper output)
{
fixture.Logger.SetOutputHelper(output);
_logger = fixture.Logger;
}

[Fact]
public async Task LoadGameTest()
{
//https://jastusa.com/saya-no-uta-the-song-of-saya
var game = new JastusaGame{ID = "saya-no-uta-the-song-of-saya", Logger = _logger};
var res = await game.LoadGame();

Assert.NotNull(res);
Assert.NotNull(game.Name);
Assert.NotEmpty(game.Images);
Assert.NotNull(game.Description);
Assert.NotNull(game.CoverImage);
Assert.NotNull(game.Studio);
Assert.NotNull(game.Publisher);
Assert.NotEmpty(game.AdditionalLinks);
Assert.NotEqual(DateTime.MinValue, game.ReleaseDate);
}
}
}
24 changes: 24 additions & 0 deletions JastusaMetadata/Consts.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// /*
// Copyright (C) 2020 erri120
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// */

namespace JastusaMetadata
{
public static class Consts
{
internal static string Root => "https://jastusa.com/";
}
}
Loading

0 comments on commit bef1b33

Please sign in to comment.