You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi.Tests/PosterPathHelperTests.cs

26 lines
929 B

using System.Collections.Generic;
using NUnit.Framework;
using Ombi.Helpers;
namespace Ombi.Tests
{
[TestFixture]
public class PosterPathHelperTests
{
[TestCaseSource(nameof(TestData))]
public string PostPathTest(string posterPath)
{
return PosterPathHelper.FixPosterPath(posterPath);
}
private static IEnumerable<TestCaseData> TestData
{
get
{
yield return new TestCaseData("https://image.tmdb.org/t/p/w150/fJAvGOitU8y53ByeHnM4avtKFaG.jpg").Returns("fJAvGOitU8y53ByeHnM4avtKFaG.jpg").SetName("Full tmdb poster path returns last part");
yield return new TestCaseData("https://image.tmdb.org/t/p/w300/https://image.tmdb.org/t/p/w300//fJAvGOitU8y53ByeHnM4avtKFaG.jpg").Returns("fJAvGOitU8y53ByeHnM4avtKFaG.jpg").SetName("Double tmdb poster path returns last part");
}
}
}
}