protected void DeleteWorker()
{
if (this.Repository != null)
{
WorkerRecord workerRecord = new WorkerRecord()
{
ApplicationName = BlueCollarSection.Section.ApplicationName,
MachineAddress = Machine.Address,
MachineName = Machine.Name,
Name = "Test Worker",
QueueNames = "*",
Signal = WorkerSignal.Stop,
Status = WorkerStatus.Working,
Startup = WorkerStartupType.Automatic,
UpdatedOn = DateTime.UtcNow
};
this.Repository.CreateWorker(workerRecord, null);
this.Repository.DeleteWorker(workerRecord.Id.Value, null);
Assert.AreEqual(0, this.Repository.GetWorkerList(workerRecord.ApplicationName, null, 100, 0, null).TotalCount);
}
}