about us      downloads      documentation      contact      home 
 products
 antHR
 workflow studio
 technical toolkits
 content entry
 workflow
 security
 hierarchy
 concepts
 how tos
 reference
 FAQs
previous: Define converter  next: Test application

How to: Create new converter - Test class

  Step 1 : Summary
  Step 2 : Define converter
  Step 3 : Test class
  Step 4 : Test application
  Step 5 : Add validation
  Step 6 : Add config
  Step 7 : Test config

Test the converter using a marked up class - (page 3 of 7)

Level: developer
Required reading: Defining content, Class markup

We will now add in the code to test the new converter.

using System;
using Ant.ContentEntry;
using Ant.ContentEntry.Converters;
using Ant.ContentEntry.FieldDisplayers;
using Ant.ContentEntry.ClassInformation;
namespace HowTos
{
    /// <summary>
    /// Class used to check the converter
    /// </summary>
    [ClassOverview]
    public class CheckConverter
    {
        int val;
        /// <summary>
        /// Gets and sets a test value
        /// </summary>
        [PropertyInformation(typeof(IntegerDivisibleConverter), typeof(InputEntry), true, 0)]
        [PropertyLanguage("ENGLISH", "Val", "Test value", "*")]
        public int Val {get {return val;} set {val = value;}}
    }
}
        
This class defines a single field that has the converter of IntegerDivisibleConverter. This field is required and stores its value in an integer.


 

Did you find this article helpful? Comments on this page are welcome and can only help us improve the quality of our documentation.
© Ant Organisation Ltd, 2003