Request information about movie from IMDB.
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MovieNavigator.Core;
using Newtonsoft.Json;
namespace MovieNavigator.Tests
{
[TestClass]
public class MovieServiceTest
{
[TestMethod]
public void GetMoviesList_JsonDeserialization_Success()
{
// Arrange
string json = @"{
'Title': 'RoboCop'
}";
// Act
var movieObject = JsonConvert.DeserializeObject<Movie>(json);
// Assert
Assert.IsTrue(!string.IsNullOrEmpty(movieObject.Title));
}
}
}