mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 14:08:44 -04:00
Clean test
This commit is contained in:
parent
39e84ba4ab
commit
d212b6fb08
1 changed files with 3 additions and 8 deletions
|
@ -25,14 +25,9 @@ namespace Jellyfin.Server.Implementations.Tests.BaseItem
|
|||
public void GetBaseKindEnumTest(Type baseItemDescendantType)
|
||||
{
|
||||
var defaultConstructor = baseItemDescendantType.GetConstructor(Type.EmptyTypes);
|
||||
|
||||
Assert.NotNull(defaultConstructor);
|
||||
if (defaultConstructor != null)
|
||||
{
|
||||
var instance = (MediaBrowser.Controller.Entities.BaseItem)defaultConstructor.Invoke(null);
|
||||
var exception = Record.Exception(() => instance.GetBaseItemKind());
|
||||
Assert.Null(exception);
|
||||
}
|
||||
var instance = (MediaBrowser.Controller.Entities.BaseItem)defaultConstructor!.Invoke(null);
|
||||
var exception = Record.Exception(() => instance.GetBaseItemKind());
|
||||
Assert.Null(exception);
|
||||
}
|
||||
|
||||
private class GetBaseItemDescendants : IEnumerable<object?[]>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue