예제 #1
0
    static void Main(string[] args)
    {
        RequestWorker requestworker = new RequestWorker(new RequestRepository());

        requestworker.Start(3, 3);
        Thread.Sleep(30000);
        requestworker.Stop();
    }
예제 #2
0
파일: Test.cs 프로젝트: vombatkombat/KLTask
        public void Test()
        {
            var repositoryStub = new RequestRepositoryStub();
            var worker         = new RequestWorker(repositoryStub);

            worker.Start(12, 56);
            Thread.Sleep(5000);
            worker.Stop();
            Assert.Equal(repositoryStub.Requested, repositoryStub.Processed + repositoryStub.Deleted);
        }