TMDbLib/TMDbLibTests/ClientJobTests.cs

39 lines
984 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TMDbLib.Objects.General;
using TMDbLibTests.JsonHelpers;
namespace TMDbLibTests
{
[TestClass]
public class ClientJobTests : TestBase
{
private TestConfig _config;
/// <summary>
/// Run once, on every test
/// </summary>
[TestInitialize]
public override void Initiator()
{
base.Initiator();
_config = new TestConfig();
}
[TestMethod]
public void TestJobList()
{
2016-02-22 20:55:27 +00:00
List<Job> jobs = _config.Client.GetJobsAsync().Result;
Assert.IsNotNull(jobs);
Assert.IsTrue(jobs.Count > 0);
2015-06-24 22:43:33 +00:00
Assert.IsTrue(jobs.All(job => !string.IsNullOrEmpty(job.Department)));
Assert.IsTrue(jobs.All(job => job.JobList != null));
Assert.IsTrue(jobs.All(job => job.JobList.Count > 0));
}
}
}