public void WhenSitecoreIoCApplicationShutdownsIApplicationApplicationShutdownIsCalled() { Isolated.Execute(() => { //Act SitecoreApplication.ApplicationShutdown(); //Assert ApplicationSpy.ApplicationShutdownWasCalled.Should().BeTrue(); }); }
public void WhenSitecoreIoCApplicationStartsIApplicationPreApplicationStartIsCalled() { Isolated.Execute(() => { //Act SitecoreApplication.PreApplicationStart(); //Assert ApplicationSpy.PreApplicationStartWasCalled.Should().BeTrue(); }); }
public void Isolated_WhenMoreThanOneApplicationExitsMultipleApplicationFoundThrown() { //Assign var extraAssemblies = new List <Assembly> { typeof(Application1).Assembly }; //Act Action multipleApplications = () => Isolated.Execute(SitecoreApplication.PreApplicationStart, extraAssemblies); //Assert multipleApplications.Should().Throw <MultipleApplicationFound>(); }