BlueCollar.Test.RepositoryTests.GetWorker C# (CSharp) Method

GetWorker() protected method

Get worker tests.
protected GetWorker ( ) : void
return void
        protected void GetWorker()
        {
            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);
                Assert.IsNotNull(this.Repository.GetWorker(workerRecord.Id.Value, null));
            }
        }