Exemplo n.º 1
0
        public void Deleted_HasMatchingPoison()
        {
            var poison = fixture.CreateAnonymous <TQueuePoison>();
            var action = DurableJobQueueAction.Deleted(poison);

            Assert.Equal(poison, action.Poison);
        }
Exemplo n.º 2
0
        public void ImplicitCastOperator_Pending_HasDefaultPoison()
        {
            var action = DurableJobQueueAction.Pending(fixture.CreateAnonymous <TQueue>());
            var cast   = (DurableJobQueueAction <TQueue, TQueuePoison>)action;

            Assert.Equal(default(TQueuePoison), cast.Poison);
        }
Exemplo n.º 3
0
        public void Pending_HasMatchingInput()
        {
            var item   = fixture.CreateAnonymous <TQueue>();
            var action = DurableJobQueueAction.Pending(item);

            Assert.Equal(item, action.Input);
        }
Exemplo n.º 4
0
        public void ImplicitCastOperator_Deleted_HasDefaultInput()
        {
            var action = DurableJobQueueAction.Deleted(fixture.CreateAnonymous <TQueuePoison>());
            var cast   = (DurableJobQueueAction <TQueue, TQueuePoison>)action;

            Assert.Equal(default(TQueue), cast.Input);
        }
Exemplo n.º 5
0
        public void Poisoned_HasMatchingInput()
        {
            var item   = fixture.CreateAnonymous <TQueue>();
            var action = DurableJobQueueAction.Poisoned(item, fixture.CreateAnonymous <TQueuePoison>());

            Assert.Equal(item, action.Input);
        }
Exemplo n.º 6
0
        public void Pending_Throws_OnNullInput_ForReferenceTypes()
        {
            if (typeof(TQueue).IsValueType)
            {
                return;
            }

            Assert.Throws <ArgumentNullException>(() => DurableJobQueueAction.Pending(default(TQueue)));
        }
Exemplo n.º 7
0
        public void Deleted_Throws_OnNullPoison_ForReferenceTypes()
        {
            if (typeof(TQueuePoison).IsValueType)
            {
                return;
            }

            Assert.Throws <ArgumentNullException>(() => DurableJobQueueAction.Deleted(default(TQueuePoison)));
        }
Exemplo n.º 8
0
        public void Poisoned_Throws_OnNullPoison_ForReferenceTypes()
        {
            if (typeof(TQueuePoison).IsValueType)
            {
                return;
            }

            Assert.Throws <ArgumentNullException>(() => DurableJobQueueAction.Poisoned(fixture.CreateAnonymous <TQueue>(), default(TQueuePoison)));
        }
Exemplo n.º 9
0
        public void Pending_HasNullPoison()
        {
            var action = DurableJobQueueAction.Pending(fixture.CreateAnonymous <TQueue>());

            Assert.Equal(null, action.Poison);
        }
Exemplo n.º 10
0
        public void Pending_HasPendingActionType()
        {
            var action = DurableJobQueueAction.Pending(fixture.CreateAnonymous <TQueue>());

            Assert.Equal(DurableJobQueueActionType.Pending, action.ActionType);
        }
Exemplo n.º 11
0
        public void Completed_HasNullPoison()
        {
            var action = DurableJobQueueAction.Completed(fixture.CreateAnonymous <TQueue>());

            Assert.Equal(null, action.Poison);
        }
Exemplo n.º 12
0
        public void Deleted_HasNullInput()
        {
            var action = DurableJobQueueAction.Deleted(fixture.CreateAnonymous <TQueuePoison>());

            Assert.Equal(null, action.Input);
        }
Exemplo n.º 13
0
        public void Deleted_HasDeletedActionType()
        {
            var action = DurableJobQueueAction.Deleted(fixture.CreateAnonymous <TQueuePoison>());

            Assert.Equal(DurableJobQueueActionType.Deleted, action.ActionType);
        }
Exemplo n.º 14
0
        public void Completed_HasCompletedActionType()
        {
            var action = DurableJobQueueAction.Completed(fixture.CreateAnonymous <TQueue>());

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