org.mockcentral.editor.nodes.fixture_group
Class FixtureNameValidator

java.lang.Object
  extended by org.mockcentral.editor.nodes.fixture_group.FixtureNameValidator

public class FixtureNameValidator
extends java.lang.Object

A class used to validate the name for a Fixture.

Author:
David Hutchinson

Constructor Summary
FixtureNameValidator(IFixtureNameEditor editor)
          Creates a new instance.
 
Method Summary
 java.lang.String isValid(java.lang.String fixtureName)
          Validates the proposed Fixture name, testing for a non-empty value and whether it would duplicate that of an existing Fixture.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixtureNameValidator

public FixtureNameValidator(IFixtureNameEditor editor)
Creates a new instance.

Parameters:
editor - the parent FixtureModel.
Method Detail

isValid

public java.lang.String isValid(java.lang.String fixtureName)
Validates the proposed Fixture name, testing for a non-empty value and whether it would duplicate that of an existing Fixture.

Parameters:
fixtureName - the proposed name for the Fixture.
Returns:
a String containing an error message as appropriate, or null if the proposed Fixture name is valid.