public void ValuesFormatterFactoryReturnsAnimeValuesFormatter() { var sut = Fixture.Factory; var animeValues = new AnimeValues(); var valuesFormatter = sut.Create(animeValues); Assert.IsType <AnimeValuesFormatter>(valuesFormatter); }
public void AnimeDataShouldMatchFormattedAnimeValuesObjectString() { AnimeValues values = _animeValuesFixture.Values; string xmlString = _formatterFixture.ValuesFormatter.Format(values); var thatXmlAreIdentical = XmlFilesAreIdentical(_animeData, xmlString); Assert.True(thatXmlAreIdentical); }
private static void TestAddAnimeByObject(ICredentialContext credential) { var methods = new AnimeListMethods(credential); var animeValues = new AnimeValues { AnimeStatus = AnimeStatus.Watching, Comments = "It was a great series." }; var responseText = methods.AddAnime(ANIME_ID, animeValues); Console.WriteLine(responseText); }
private static void UpdateAnimeValue(CredentialContext credential) { var animeId = 32615; // Youjo Senki (TV) short epsWatched = 6; var persScore = 8; var methods = new AnimeListMethods(credential); AnimeValues animeValues = new AnimeValues { Episode = epsWatched, Score = (Score)persScore }; var response = methods.UpdateAnime(animeId, animeValues); Console.WriteLine(response); }
/// <summary> /// Update Anime info by ID /// </summary> /// <param name="id">Anime ID on MyAnimeList.net</param> /// <param name="animeValues">object that represents XML specification</param> /// <returns>Response from the server in raw string whether anime was added correctly or not</returns> public string UpdateAnime(int?id, AnimeValues animeValues) { var data = GetDataStringFromMyAnimeListValues(animeValues); return(UpdateAnime(id, data)); }
public async Task <string> UpdateAnimeAsync(int?id, AnimeValues animeValues) { var data = GetDataStringFromMyAnimeListValues(animeValues); return(await UpdateAnimeAsync(id, data)); }
public AnimeValuesTest(CredentialContextFixture credentialContextFixture, ITestOutputHelper output) : base(credentialContextFixture) { _output = output; _sut = new AnimeValues(); }