Suggestions from review
This commit is contained in:
parent
fa7b7b84e7
commit
39e84ba4ab
|
@ -13,7 +13,7 @@ namespace Jellyfin.Server.Implementations.Tests.BaseItem
|
||||||
public class BaseItemKindTests
|
public class BaseItemKindTests
|
||||||
{
|
{
|
||||||
[Theory]
|
[Theory]
|
||||||
[ClassData(typeof(GetBaseItemDescendant))]
|
[ClassData(typeof(GetBaseItemDescendants))]
|
||||||
public void BaseItemKindEnumTest(Type baseItemType)
|
public void BaseItemKindEnumTest(Type baseItemType)
|
||||||
{
|
{
|
||||||
var enumValue = Enum.Parse<BaseItemKind>(baseItemType.Name);
|
var enumValue = Enum.Parse<BaseItemKind>(baseItemType.Name);
|
||||||
|
@ -21,7 +21,7 @@ namespace Jellyfin.Server.Implementations.Tests.BaseItem
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[ClassData(typeof(GetBaseItemDescendant))]
|
[ClassData(typeof(GetBaseItemDescendants))]
|
||||||
public void GetBaseKindEnumTest(Type baseItemDescendantType)
|
public void GetBaseKindEnumTest(Type baseItemDescendantType)
|
||||||
{
|
{
|
||||||
var defaultConstructor = baseItemDescendantType.GetConstructor(Type.EmptyTypes);
|
var defaultConstructor = baseItemDescendantType.GetConstructor(Type.EmptyTypes);
|
||||||
|
@ -35,7 +35,7 @@ namespace Jellyfin.Server.Implementations.Tests.BaseItem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class GetBaseItemDescendant : IEnumerable<object?[]>
|
private class GetBaseItemDescendants : IEnumerable<object?[]>
|
||||||
{
|
{
|
||||||
private static bool IsProjectAssemblyName(string? name)
|
private static bool IsProjectAssemblyName(string? name)
|
||||||
{
|
{
|
||||||
|
@ -46,8 +46,7 @@ namespace Jellyfin.Server.Implementations.Tests.BaseItem
|
||||||
|
|
||||||
return name.StartsWith("Jellyfin", StringComparison.OrdinalIgnoreCase)
|
return name.StartsWith("Jellyfin", StringComparison.OrdinalIgnoreCase)
|
||||||
|| name.StartsWith("Emby", StringComparison.OrdinalIgnoreCase)
|
|| name.StartsWith("Emby", StringComparison.OrdinalIgnoreCase)
|
||||||
|| name.StartsWith("MediaBrowser", StringComparison.OrdinalIgnoreCase)
|
|| name.StartsWith("MediaBrowser", StringComparison.OrdinalIgnoreCase);
|
||||||
|| name.StartsWith("RSSDP", StringComparison.OrdinalIgnoreCase);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerator<object?[]> GetEnumerator()
|
public IEnumerator<object?[]> GetEnumerator()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user