Add test for HttpException

This commit is contained in:
Kegan Myers 2014-03-03 14:41:40 -06:00
parent c98f357bba
commit fff51ff95f
2 changed files with 17 additions and 1 deletions

View file

@ -1,4 +1,4 @@
describe("", function () {
describe("Typertext.Http.HttpException", function () {
it("exists", function () {
expect(typeof Typertext.Http.HttpException).toEqual("function");
});

View file

@ -0,0 +1,16 @@
describe("", function () {
it("exists", function () {
expect(typeof Typertext.Http.HttpException).toEqual("function");
});
it("works according to the parent class", function () {
var inputString = "Test message",
inputCode = 239,
inputHttp = Typertext.Http.HttpResponseStatus.clientError;
var testClass = new Typertext.Http.HttpException(inputString, inputCode, inputHttp);
expect(testClass.GetCode()).toEqual(inputCode);
expect(testClass.GetCustom()).toEqual(inputHttp);
expect(testClass.GetMessage()).toEqual(inputString);
});
});