public void ShouldReturnJsonResult_FormEvent()
        {
            // Arrange
            var formEventPostModel = new FormEventPostModel();
            var formEvent = new FormEvent();

            _entityMapper.Expect(x => x.Map<FormEvent>(formEventPostModel)).Return(formEvent);
            _formEventTrackingService.Expect(x => x.Add(formEvent));

            _mockRepository.ReplayAll();

            // Act
            var jsonResult = _trackingController.FormEvent(formEventPostModel);

            // Assert
            Assert.That(jsonResult, Is.Not.Null);
            _mockRepository.VerifyAll();
        }
 public JsonResult FormEvent(FormEventPostModel formEventPostModel)
 {
     var formEvent = _entityMapper.Map<FormEvent>(formEventPostModel);
     var model = _formEventTrackingService.Add(formEvent);
     return Json(model, JsonRequestBehavior.AllowGet);
 }