//**************************************************************************
//
//
//                       National Institute Of Standards and Technology
//                                     DTS Version 1.0
//
//                                  Entity Interface
//**************************************************************************

function Entity()
{
  var tests = new Array (core0001EN(), core0002EN(), core0003EN());

   return tests;
}

//------------------------ test case core-0001EN ------------------------
//
// Testing feature - The nodeName (from the Node interface) contains the name
//                   of the entity.
//
// Testing approach - Retrieve the entity mamed "ent1" and access its name
//                    by invoking the nodeName from the Node interface.
//
// Semantic Requirements: 1
//
// Last modification date - April 30, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function core0001EN()
 {
   var computedValue = "";
   var expectedValue = "ent1"
   var testNode = "";

    results = new testResults("Core0001EN");

    results.description = "The nodeName attribute (from the Node interface) "+
                          "contains the name of the entity.";
//
// Retrieve the targeted data. 
//
    testNode = getEntity("ent1");
    computedValue = testNode.nodeName;
//
// Write out results
//
    results.expected = expectedValue;
    results.actual = computedValue;

    return results;
}

//------------------------ End test case core-0001EN --------------------------
//
//--------------------------- test case core-0002EN ---------------------------
//
// Testing feature - The "publicId" attribute of an Entity node contains the
//                   public identifier associated with the entity, if one was
//                   specified. 
//
// Testing approach - Retrieve the entity mamed "ent5" and access its 
//                    "publicId" attribute.  It should be set to "entityURI"
//
// Semantic Requirements: 2 
//
// Last modification date - April 30, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function core0002EN()
 {
   var computedValue = "";
   var expectedValue = "entityURI"; 
   var testNode = "";

    results = new testResults("Core0002EN");

    results.description = "The publicId contains the public identifier "+
                          "associated with this entity.";
//
// Retrieve the targeted data and access its "publicId" attribute.
//
    testNode = getEntity("ent5");
    computedValue = testNode.publicId;
//
// Write out results
//
    results.expected = expectedValue;
    results.actual = computedValue;

    return results;
}

//------------------------ End test case core-0002EN --------------------------
//
//--------------------------- test case core-0003EN ---------------------------
//
// Testing feature - If no public identifier was specified for the entity
//                   the "publicId" attribute is null.
//
// Testing approach - Retrieve the entity mamed "ent1" and access its
//                    "publicId" attribute.  Since no public identifier
//                    was specified for this entity, the "publicId" 
//                    attribute should be null.
//
// Semantic Requirements: 3 
//
// Last modification date - April 30, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function core0003EN()
 {
   var computedValue = "";
   var expectedValue = null;
   var testNode = "";

    results = new testResults("Core0003EN");	

    results.description = "The publicId attribute is null if no public "+
                          "identifier was specified for this entity."
//
// Retrieve the targeted data and access its "publicId" attribute.
//
    testNode = getEntity("ent1");
    computedValue = testNode.publicId;
//
// Write out results
//
    results.expected = expectedValue;
    results.actual = computedValue;

    return results;
}

//------------------------ End test case core-0003EN --------------------------