mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Getting model by invalid ID throws a more specific exception.
This commit is contained in:
@@ -84,7 +84,7 @@ namespace NzbDrone.Core.Test.Datastore
|
||||
[Test]
|
||||
public void getting_model_with_invalid_id_should_throw()
|
||||
{
|
||||
Assert.Throws<InvalidOperationException>(() => Subject.Get(12));
|
||||
Assert.Throws<ModelNotFoundException>(() => Subject.Get(12));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
@@ -31,7 +32,7 @@ namespace NzbDrone.Core.Test.Qualities
|
||||
public void should_throw_with_id_if_not_exist()
|
||||
{
|
||||
var id = 123;
|
||||
Assert.Throws<InvalidOperationException>(()=> Subject.GetByQualityId(id)).Message.Contains(id.ToString());
|
||||
Assert.Throws<ModelNotFoundException>(()=> Subject.GetByQualityId(id)).Message.Contains(id.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user