Forum Discussion

FICO's avatar
FICO
Community Manager
11 years ago

Database provider does not work.

Hi,

I am trying to write a database provider, which should call the database, get a list of data and show me as a list in a Action Cell of a Decision Table.

I have done the following:

1.Created a database provider with all the connection string and the select query.

2.Created a code template and added reference to the database provider created above while creating the Value holder.

3. Mapped this code template to the Action Cell of the Decision Table.

How do I test that the database provider is working. The instance file does allow me to chose the code template but no value is displayed.

Thanks for your reply in advance,

Jiten

1 Reply

  • FICO's avatar
    FICO
    Community Manager

    Start by testing it in a simple code or function template instance. If you get the values when displaying it in a "normal" template instance, you have an issue with the decision table template. If you get no values in the normal template instance, your have a problem with your provider.

    If you implement your retrieval logic in non-blaze-api methods (which usually take hard-to-mock arguments), you can test the retrieval logic in a regular unit test. That would leave the blaze api integration as the only unknown factor in your provider, and that you need to test by creating templates that use your provider.

    Regards,

    Jostein