Package ninja

Examples of ninja.Result


    @Test
    public void testThatPostArticleReturnsOkWhenArticleDaoReturnsTrue() {

        when(articleDao.postArticle(null, null)).thenReturn(true);
       
        Result result = apiController.postArticleJson(null, null);
       
        assertEquals(200, result.getStatusCode());

    }
View Full Code Here


    @Test
    public void testThatPostArticleReturnsNotFoundWhenArticleDaoReturnsFalse() {

        when(articleDao.postArticle(null, null)).thenReturn(false);
       
        Result result = apiController.postArticleJson(null, null);
       
        assertEquals(404, result.getStatusCode());

    }
View Full Code Here

    @Test
    public void testThatPostArticleReturnsOkWhenArticleDaoReturnsTrue() {

        when(articleDao.postArticle(null, null)).thenReturn(true);
       
        Result result = apiController.postArticleJson(null, null);
       
        assertEquals(200, result.getStatusCode());

    }
View Full Code Here

    @Test
    public void testThatPostArticleReturnsNotFoundWhenArticleDaoReturnsFalse() {

        when(articleDao.postArticle(null, null)).thenReturn(false);
       
        Result result = apiController.postArticleJson(null, null);
       
        assertEquals(404, result.getStatusCode());

    }
View Full Code Here

TOP

Related Classes of ninja.Result

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.