Java: Leveraging Reflection to Build Dynamic Proxies & Unit Tests

Java 15
  • 8 Videos | 57m 38s
  • Includes Assessment
  • Earns a Badge
Reflection in Java is commonly used to create and use dynamic proxies, which allow you to create objects that implement one or more interfaces at runtime. Reflection is also used to build harnesses for unit testing frameworks to invoke set up and tear down methods and run tests. Use this course to get to grips with these use cases. Work with and learn why dynamic proxies are incredibly powerful. Investigate what happens to methods you invoke on an instance of a dynamic proxy class. Then create a unit-testing framework harness similar to the JUnit framework in Java. Use annotations to identify methods and mark tests to run before using reflection to identify them and run them in the correct sequence. When you're finished, you'll have the ability to use reflection to create dynamic proxies and build harnesses for unit test frameworks.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    implement a dynamic proxy to create a dynamic object implementing an interface
    invoke interface methods and object base class methods on proxies
    pass proxy method invocations to a real object
  • create annotations for the setup, teardown, and test case for a unit testing framework
    annotate test case methods for unit testing
    execute test cases using a custom test harness
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 33s
    UP NEXT
  • Playable
    2. 
    Working with Dynamic Proxies
    10m
  • Locked
    3. 
    Invoking Interface and Object Functions on Proxies
    7m 3s
  • Locked
    4. 
    Constructing Proxies to Pass Method Invocations
    10m 12s
  • Locked
    5. 
    Creating Annotations for a Unit Testing Framework
    8m 18s
  • Locked
    6. 
    Using Annotations to Write Test Cases
    8m 27s
  • Locked
    7. 
    Running Test Cases Using a Custom Test Harness
    5m 58s
  • Locked
    8. 
    Course Summary
    2m 9s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.