protected void JobThrowsDependentJobWasNotRunException() { var criteria = new PunchRoundTestCriteria() { StartDate = new DateTime(2017, 4, 10) }; var exception = new FileNotExistException("fileName", null); CommandExecutor.Setup(w => w.Execute <WtkProfileExtractOutputData, List <WtkProfile> >(It.IsAny <WtkProfileExtractOutputData>())) .Throws(exception); Assert.Throws <DependentJobWasNotRunException>(() => Job.Run(criteria)); }
protected void JobThrowsSourceFileWasNotFoundException() { var criteria = new PunchRoundTestCriteria() { StartDate = new DateTime(2017, 4, 10) }; var exception = new FileNotExistException("fileName", null); CommandExecutor.Setup(w => w.Execute <TimesheetExtractOutputData, TimesheetReadCommandResult <List <ChangePunch> > >(It.IsAny <TimesheetExtractOutputData>())).Throws(exception); Assert.Throws <SourceFileWasNotFoundException>(() => Job.Run(criteria)); }
public SourceFileWasNotFoundException(FileNotExistException ex) : base(ex.FileName, ex) { }
public DependentJobWasNotRunException(FileNotExistException ex) : base(ex.FileName, ex) { }