Example #1
0
        public void TestNotSatisfied()
        {
            var demand = new JobDemand
            {
                { SourceType.Avito, 10 }
            };
            var demandResult = new JobDemandResult
            {
                { SourceType.Avito, new List <AdDownloadJob>() }
            };

            Assert.False(demandResult.DoesSatisfyDemand(demand));
        }
Example #2
0
        public void TestSatisfied()
        {
            var demand = new JobDemand
            {
                { SourceType.Avito, 1 }
            };
            var demandResult = new JobDemandResult
            {
                { SourceType.Avito, new List <AdDownloadJob> {
                      new AdDownloadJob()
                  } }
            };

            Assert.True(demandResult.DoesSatisfyDemand(demand));
        }