public void ThrowUnsupportedWhenNoTypeCode()
        {
            var workOrder = _fixture.Create <WorkOrder>();

            workOrder.Id = 41;
            var jobStatusUpdate = new JobStatusUpdate();

            Assert.ThrowsAsync <NotSupportedException>(async() => await _classUnderTest.ProcessActions(jobStatusUpdate));
        }
        private async Task ValidateStrategyResolution <T>(JobStatusUpdate jobStatusUpdate)
            where T : IJobStatusUpdateStrategy
        {
            var useCaseMock = new Mock <IJobStatusUpdateStrategy>();

            _mockActivatorWrapper.Setup(x => x.CreateInstance <T>())
            .Returns(useCaseMock.Object);

            await _classUnderTest.ProcessActions(jobStatusUpdate);

            useCaseMock.Verify(x => x.Execute(It.IsAny <JobStatusUpdate>()));
        }
        public void ThrowUnsupportedWhenNonSupportedTypeCodes(JobStatusUpdateTypeCode typeCode, string otherTypeCode)
        {
            var workOrder = _fixture.Create <WorkOrder>();

            workOrder.Id = 41;
            var jobStatusUpdate = new JobStatusUpdate
            {
                TypeCode  = typeCode,
                OtherType = otherTypeCode
            };

            Assert.ThrowsAsync <NotSupportedException>(async() => await _classUnderTest.ProcessActions(jobStatusUpdate));
        }