Source Code - zip file format 9 KB

Listing 1: The Robot Framework's TurnLeft() method

public void TurnLeft()
{
	switch(_Direction)
	{
		case DIRECTION.North:
			_Direction = DIRECTION.West;
			break;
		case DIRECTION.East:
			_Direction = DIRECTION.North;
					break;
		case DIRECTION.South:
			_Direction = DIRECTION.East;
			break;
		default:
			_Direction = DIRECTION.South;
			break;
	}
}


Listing 2: The Robot Framework's TestTurnLeft() method

[Test]
public void TestTurnLeft()
{
	Robot.TurnLeft();
	Assert.AreEqual(
BaseRobot.DIRECTION.West, Robot.Direction);

	Robot.TurnLeft();
	Assert.AreEqual(
BaseRobot.DIRECTION.South, Robot.Direction);

	Robot.TurnLeft();
	Assert.AreEqual(
BaseRobot.DIRECTION.East, Robot.Direction);
	Robot.TurnLeft();
	Assert.AreEqual(
BaseRobot.DIRECTION.North, Robot.Direction);
}


Listing 3: A <project> entry in ccnet.config file

<cruisecontrol>
 <project name="Robot Framework Project">
  <name>Robot Framework</name>
  <workingDirectory>C:\Projects\RobotFramework</workingDirectory>
  <modificationDelaySeconds>2</modificationDelaySeconds>
  <triggers>
   <intervalTrigger seconds="15" />
  </triggers>
  <sourcecontrol type="vss" autoGetSource="false" applyLabel="false">
<executable>C:\Program Files\Microsoft Visual Studio\VSS\win32\SS.EXE</executable>
	<project>$/Projects/RobotFramework/</project>
	<username>admin</username>
	<password></password>
	<ssdir>C:\Program Files\Microsoft Visual Studio\VSS</ssdir>
	<workingDirectory>C:\Projects\RobotFramework</workingDirectory>
  </sourcecontrol>
  <tasks>
    <nant>
	<executable>nant.exe</executable>
	<buildFile>default.build</buildFile>
    </nant>
  </tasks>
  <publishers>
    <xmllogger />
  </publishers>
 </project>
</cruisecontrol>

Source Code - zip file format 9 KB