Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Testing Interviews:Analyst TestingAutomationDatabase TestingJSUnitJUnitLocalization TestingManual TestingMobile TestingNetwork TestingQA ConceptsQA TestingQTPQUnitRadar TesterRational TestSuiteSoftware QASoftware TestingTest CasesTest Documents ReportingWebsites Stress TestingWinRunnerWireless Testing
Copyright © 2018. All Rights Reserved
JUnit Interview Question:
How Do You Test a private Method?
Submitted by: AdministratorWhen a method is declared as "private", it can only be accessed within the same class. So there is no way to test a "private" method of a target class from any test class.
To resolve this problem, you have to perform unit testing manually. Or you have to change your method from "private" to "protected".
Submitted by: Administrator
To resolve this problem, you have to perform unit testing manually. Or you have to change your method from "private" to "protected".
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.