public void GetMoviePosterName_Successfully_Test()
        {
            var theaterServiceMock = new Mock <ITheaterService>();

            string title = "";

            theaterServiceMock.Setup(x => x.GetMoviePosterName(title));

            var controller   = new TheaterController(theaterServiceMock.Object);
            var actualResult = controller.GetMoviePosterName(title);

            var okResult     = (OkObjectResult)actualResult;
            var asJson       = JsonConvert.SerializeObject(okResult.Value);
            var deserialized = JsonConvert.DeserializeObject <Dictionary <string, object> >(asJson);

            Assert.IsTrue((bool)deserialized["Success"]);

            theaterServiceMock.VerifyAll();
        }
        public void GetMoviePosterName_InternalServerError_Test()
        {
            var theaterServiceMock = new Mock <ITheaterService>();

            string title = "";

            theaterServiceMock.Setup(x => x.GetMoviePosterName(title))
            .Throws <Exception>();

            var controller   = new TheaterController(theaterServiceMock.Object);
            var actualResult = controller.GetMoviePosterName(title);

            var badRequestResult = (ObjectResult)actualResult;
            var asJson           = JsonConvert.SerializeObject(badRequestResult.Value);
            var deserialized     = JsonConvert.DeserializeObject <Dictionary <string, object> >(asJson);

            Assert.IsTrue((bool)deserialized["Success"] == false);

            theaterServiceMock.VerifyAll();
        }