Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update
  • Toc
  • feedback
Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

By : Agarwal, Aggarwal, Elangovan
4.4 (7)
close
Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

4.4 (7)
By: Agarwal, Aggarwal, Elangovan

Overview of this book

Microsoft Dynamics AX 2012 R3 Reporting Cookbook is recommended for Dynamics AX developers and .NET-based SSRS developers looking to familiarize themselves with the new AX reporting framework.
Table of Contents (12 chapters)
close
11
Index

Creating a unit test class for a controller class

In the previous recipe, you learned how to write a unit test class for a contract class. In this recipe, you will learn how to create unit test classes for a controller class. A controller class is used for report execution as well as processing of report data. For the unit test class, first we will create a new controller class and then test the business logic inside that controller class in AX R3.

Getting ready

To work with this recipe, we need to create a controller class named PKTVendInvoiceController that extends SRSReportRunController.

How to do it...

  1. The first step is to add a PKTVendInvoiceController class which extends SRSReportRunController:
    public class PKTVendInvoiceController extends SrsReportRunController
    {
    }
    public void execute(Args _args)
    {
        this.parmReportName(ssrsReportStr(PKTVendInvoice, Report));
        this.parmArgs(_args);
        this.startOperation();
    }
    
    public static PKTVendInvoiceController construct()
    {
        return new PKTVendInvoiceController...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete