Ejemplo n.º 1
0
        public void HttpStatusCodeIsPopulated()
        {
            var ex = new NoPrimaryKeyFoundException("entity");

            Assert.AreEqual(HttpStatusCode.InternalServerError, ex.ResponseCode);
        }
Ejemplo n.º 2
0
        public void ErrorMessageIsPopulated()
        {
            var ex = new NoPrimaryKeyFoundException("entity");

            Assert.AreEqual("Entity 'entity' does not contain a primary key.", ex.Message);
        }
Ejemplo n.º 3
0
        public void HttpErrorMessageIsPopulated()
        {
            var ex = new NoPrimaryKeyFoundException("entity");

            Assert.AreEqual("EntityKeyNotFound", ex.HttpErrorMessage);
        }
Ejemplo n.º 4
0
        public void IsBaseException()
        {
            var ex = new NoPrimaryKeyFoundException("a");

            Assert.IsInstanceOfType(ex, typeof(BaseCaughtException));
        }