Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Question regarding Tests

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following statements are true about tests? (multiple answers)
a. Tests can call another test
b. The order of tests occurring within a test case is guaranteed
c. If a previous test sets up data, that test can be used inside of other tests relying on the previous data
d. Changes made by a test method will modify the other methods also in the same test
 
author & internet detective
Posts: 39957
804
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sounds like a quiz. How about you say what you think and why and we'll tell you if you are correct.
 
Mark Weinberg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the answers are a, c and d but I'm not sure. The exception being b because I don't think the order of tests is guaranteed at all.
 
Jeanne Boyarsky
author & internet detective
Posts: 39957
804
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with you on A and D being correct. And with B being incorrect. Even if the order of test happens to be the same every time, this isn't guaranteed.

For C, I'm not sure if I am reading it right. To me, it sounds like it saying to rely on state set up earlier but also to call the test again to ensure it is set up. Which seems to conflict with itself.
 
Mark Weinberg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Jeanne for helping me out. I greatly appreciate it.
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic