Exemple #1
0
        public void ImplicitCastOperator_Completed_HasDefaultPoison()
        {
            var action = DurableJobQueueAction.Completed(fixture.CreateAnonymous <TQueue>());
            var cast   = (DurableJobQueueAction <TQueue, TQueuePoison>)action;

            Assert.Equal(default(TQueuePoison), cast.Poison);
        }
Exemple #2
0
        public void Completed_HasMatchingInput()
        {
            var item   = fixture.CreateAnonymous <TQueue>();
            var action = DurableJobQueueAction.Completed(item);

            Assert.Equal(item, action.Input);
        }
Exemple #3
0
        public void Completed_Throws_OnNullInput_ForReferenceTypes()
        {
            if (typeof(TQueue).IsValueType)
            {
                return;
            }

            Assert.Throws <ArgumentNullException>(() => DurableJobQueueAction.Completed(default(TQueue)));
        }
Exemple #4
0
        public void Completed_HasNullPoison()
        {
            var action = DurableJobQueueAction.Completed(fixture.CreateAnonymous <TQueue>());

            Assert.Equal(null, action.Poison);
        }
Exemple #5
0
        public void Completed_HasCompletedActionType()
        {
            var action = DurableJobQueueAction.Completed(fixture.CreateAnonymous <TQueue>());

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