Exemplo n.º 1
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.º 2
0
        public void Poisoned_HasMatchingPoison()
        {
            var poison = fixture.CreateAnonymous <TQueuePoison>();
            var action = DurableJobQueueAction.Poisoned(fixture.CreateAnonymous <TQueue>(), poison);

            Assert.Equal(poison, action.Poison);
        }
Exemplo n.º 3
0
        public void Poisoned_Throws_OnNullPoison_ForReferenceTypes()
        {
            if (typeof(TQueuePoison).IsValueType)
            {
                return;
            }

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

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