public void InstallRemoteMsiManager_WhenAskedToDoSo() { // Arrange SUT action = new SUT(Tools.GetXmlFragment("Install Remote Msi Manager.CustAct")); var finalResult = Tools.GetReturnCodeAction(); // Act List <CU.MsiProduct> installedProducts = CU.GetMsiProducts(); action.Run(ref finalResult); installedProducts = CU.GetMsiProducts(); // Assert Assert.IsTrue(Tools.ProductsContains(installedProducts, "D0A41530-E762-4C7D-8A72-E2D0E07C8A2E")); Assert.AreEqual(0, finalResult.ReturnValue); }
public void ProperlyInitializeProperties_WhenCalledWithNormalParameters() { // Arrange SUT action = new SUT(Tools.GetXmlFragment("InstallMsi.CustAct")); // Act // Assert Assert.AreEqual("MyMsiName.msi", action.MsiName, true); Assert.AreEqual("PROPERTY=Value", action.Parameters, true); Assert.IsTrue(action.IsLogRequested); Assert.AreEqual(@"C:\Windows\Temp\MyMsiLog.log", action.LogPath, true); Assert.AreEqual(1, action.UiLevel); Assert.AreEqual(2, action.RestartBehavior); Assert.IsTrue(action.KillProcess); Assert.AreEqual(4, action.KillAfter); Assert.IsTrue(action.StoreToVariable); }