Java: Leveraging Reflection to Build Dynamic Proxies & Unit Tests
Java 15
| Expert
- 8 videos | 54m 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 courseimplement a dynamic proxy to create a dynamic object implementing an interfaceinvoke interface methods and object base class methods on proxiespass proxy method invocations to a real object
-
create annotations for the setup, teardown, and test case for a unit testing frameworkannotate test case methods for unit testingexecute test cases using a custom test harnesssummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview2m 33sUP NEXT
-
2.Working with Dynamic Proxies10m
-
3.Invoking Interface and Object Functions on Proxies7m 3s
-
4.Constructing Proxies to Pass Method Invocations10m 12s
-
5.Creating Annotations for a Unit Testing Framework8m 18s
-
6.Using Annotations to Write Test Cases8m 27s
-
7.Running Test Cases Using a Custom Test Harness5m 58s
-
8.Course Summary2m 9s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.