using System; using FluentAssertions; using NUnit.Framework; using NzbDrone.Core.Notifications.Xbmc; using NzbDrone.Core.Test.Framework; namespace NzbDrone.Core.Test.NotificationTests.Xbmc.Http { [TestFixture] public class CheckForErrorFixture : CoreTest { [Test] public void should_be_true_when_the_response_contains_an_error() { const string response = "html>
  • Error:Unknown command"; Subject.CheckForError(response).Should().BeTrue(); } [Test] public void JsonError_true_empty_response() { var response = String.Empty; Subject.CheckForError(response).Should().BeTrue(); } [Test] public void JsonError_false() { const string response = "html>
  • Filename:[Nothing Playing]"; Subject.CheckForError(response).Should().BeFalse(); } } }