Пример #1
0
        public void ImplicitCastOperator_Queued_HasDefaultPoison()
        {
            var action = DurableJobQueueAction.Queued(fixture.CreateAnonymous <TQueue>());
            var cast   = (DurableJobQueueAction <TQueue, TQueuePoison>)action;

            Assert.Equal(default(TQueuePoison), cast.Poison);
        }
Пример #2
0
        public void Queued_HasMatchingInput()
        {
            var item   = fixture.CreateAnonymous <TQueue>();
            var action = DurableJobQueueAction.Queued(item);

            Assert.Equal(item, action.Input);
        }
Пример #3
0
        public void Queued_Throws_OnNullInput_ForReferenceTypes()
        {
            if (typeof(TQueue).IsValueType)
            {
                return;
            }

            Assert.Throws <ArgumentNullException>(() => DurableJobQueueAction.Queued(default(TQueue)));
        }
Пример #4
0
        public void Queued_HasNullPoison()
        {
            var action = DurableJobQueueAction.Queued(fixture.CreateAnonymous <TQueue>());

            Assert.Equal(null, action.Poison);
        }
Пример #5
0
        public void Queued_HasQueuedActionType()
        {
            var action = DurableJobQueueAction.Queued(fixture.CreateAnonymous <TQueue>());

            Assert.Equal(DurableJobQueueActionType.Queued, action.ActionType);
        }