public void Should_ReturnExpectedInstallerStatus_When_RequestInstallerStatus() { UpdateSessionFake session = new UpdateSessionFake(true); using (WuApiController wu = new WuApiController(session, UpdateCollectionFactory, SystemInfo)) { session.InstallerMock.IsBusy = true; Assert.AreEqual(wu.GetInstallerStatus(), InstallerStatus.Busy); session.InstallerMock.IsBusy = false; } using (WuApiController wu = new WuApiController(session, UpdateCollectionFactory, SystemInfo)) { session.InstallerMock.RebootRequiredBeforeInstallation = true; Assert.AreEqual(wu.GetInstallerStatus(), InstallerStatus.RebootRequiredBeforeInstallation); session.InstallerMock.RebootRequiredBeforeInstallation = false; } using (WuApiController wu = new WuApiController(session, UpdateCollectionFactory, SystemInfo)) { Assert.AreEqual(wu.GetInstallerStatus(), InstallerStatus.Ready); } }