Exemple #1
0
        public void CreateError_ShortMessage_ErrorCreated()
        {
            var errorDto = new ErrorDto
            {
                Message       = "Hello World",
                ClientVersion = "0.99",
                LineNumber    = 2
            };

            JsonResult result          = ErrorController.Create(errorDto);
            var        createdErrorDto = (ErrorDto)result.Data;

            Assert.NotNull(createdErrorDto);
        }
        public void CreateError_ShortMessage_ErrorCreated()
        {
            ErrorDto errorDto = new ErrorDto
            {
                Message       = "Hello World",
                ClientVersion = "0.99",
                LineNumber    = 2
            };

            NHibernateSessionManager.Instance.OpenSessionAndBeginTransaction();
            JsonServiceStackResult result = (JsonServiceStackResult)ErrorController.Create(errorDto);

            NHibernateSessionManager.Instance.CommitTransactionAndCloseSession();

            ErrorDto createdErrorDto = (ErrorDto)result.Data;

            Assert.NotNull(createdErrorDto);
        }