Skip to content

Commit

Permalink
Added test to increase Code Coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tynor88 committed Dec 26, 2015
1 parent ce00009 commit 0617ced
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,24 @@ public void JobFactoryIsCorrectlyUsedForIJobCreationTest()
Assert.AreEqual(TopshelfExitCode.Ok, exitCode);
factoryMock.Verify(factory => factory.NewJob(It.IsAny<TriggerFiredBundle>(), It.IsAny<IScheduler>()), Times.AtLeastOnce);
}

[Test, RunInApplicationDomain]
public void ExceptionIsThrownWhenTheContainerIsNullTest()
{
//Arrange
Container nullContainer = null;

//Act
var exception = Assert.Throws<ArgumentNullException>(() =>
HostFactory.New(config =>
{
config.UseTestHost();
config.UseQuartzSimpleInjector(nullContainer);
}));

//Assert
Assert.AreEqual("Value cannot be null.\r\nParameter name: container", exception.Message);
}
}

public class TestService
Expand Down

0 comments on commit 0617ced

Please sign in to comment.