O'Reilly logo

UML™ Bible by Tom Pender

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 7

Testing with Objects

images

In This Chapter

  • Modeling objects and links
  • Comparing the Class and Object diagrams
  • Testing the Class diagram with Object diagrams
  • Modeling the Composite Structure diagram
  • Modeling collaborations and collaboration occurrences

images

The Object diagram provides the means to explore specific facts. The Class diagram models definitions and rules. The contrast of these two diagrams is a great benefit to modelers. Most often we talk about a problem using concepts and general rules about how things work. When there is a dispute over the interpretation of a concept or a rule, we often apply examples, specific data, and circumstances that either prove or disprove our interpretation. The Object diagram is the UML tool for modeling an example.

Throughout a project we want to verify that what we have modeled is accurate. Verification requires test cases that exercise the definitions and rules we've captured in our Class diagram. Modeling a test case requires the means to represent specific data, relationships, and behaviors. The Object diagram is ideally suited to model the data and relationships of the test cases, while the Interaction diagrams model the behavior. Interaction diagrams (covered in Chapters 8 through 10) describe how objects use one another's services. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required