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.
recyclarr/src/tests/Recyclarr.TrashLib.TestLibrary/NewCf.cs

43 lines
1019 B

using Recyclarr.TrashLib.Models;
namespace Recyclarr.TrashLib.TestLibrary;
public static class NewCf
{
public static CustomFormatData DataWithScore(string name, string trashId, int score, int id = 0)
{
return new CustomFormatData
{
Id = id,
Name = name,
TrashId = trashId,
TrashScores = {["default"] = score}
};
}
public static CustomFormatData DataWithScores(
string name,
string trashId,
int id,
params (string ScoreSet, int Score)[] scores)
{
return new CustomFormatData
{
Id = id,
Name = name,
TrashId = trashId,
TrashScores = scores.ToDictionary(x => x.ScoreSet, x => x.Score)
};
}
public static CustomFormatData Data(string name, string trashId, int id = 0)
{
return new CustomFormatData
{
Id = id,
Name = name,
TrashId = trashId
};
}
}