Exemplo n.º 1
0
        public void Factory_should_create_worker_unit()
        {
            var factory = new UnitOfExecutionsFactory();

            var threadExec = factory.GetDedicatedThread();

            Check.That(threadExec).IsNotNull();
        }
Exemplo n.º 2
0
        public void Factory_should_decrease_core_count()
        {
            var factory = new UnitOfExecutionsFactory();
            var initialCount = factory.AvailableCore;
            var threadExec = factory.GetDedicatedThread();

            Check.That(threadExec).IsNotNull();
            Check.That(factory.AvailableCore).IsEqualTo(initialCount - 1);
        }