Skip to content

Test - #2

Open
8Invader8 wants to merge 4 commits into
mainfrom
Test
Open

Test#2
8Invader8 wants to merge 4 commits into
mainfrom
Test

Conversation

@8Invader8

Copy link
Copy Markdown
Owner

Second version of logic.
Change:
-Main logic;
-All pages;
-Add a couple of tests and logs(don`t work);

  • Add a little story and other some changes.

Add:
-Main page;
-First choice page;
-Second choice page;
-lose page;
-Servlets(Redirect,MainController and other).
Add:
-Main page;
-First choice page;
-Second choice page;
-lose page;
-Servlets(Redirect,MainController and other).
Change:
-Main logic;
-All pages;
-Add a couple of tests and logs(don`t work);
- Add a little story and other some changes.
Comment thread logs/textQuest.log

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed this file

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/first_question")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

firstQuestion , use cammelCase syntax


@WebServlet("/first_question")
public class FirstQuestionPage extends HttpServlet {
private final static Logger LOGGER = LoggerFactory.getLogger(FirstQuestionPage.class);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make all logger words in upper case

import java.io.IOException;

@WebServlet("/first_question")
public class FirstQuestionPage extends HttpServlet {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class name should end on Servlet



@WebServlet("/main")
public class MainPage extends HttpServlet {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MainServlet

private final static Logger LOGGER = LoggerFactory.getLogger(MainPage.class);
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
LOGGER.warn("User on Main page.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not informative log

private final static Logger LOGGER = LoggerFactory.getLogger(MainPage.class);
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
LOGGER.warn("User on Main page.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info instead of warn




class MainPageTest {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unit tests add only for buisness logic(service layer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants