Exemplo n.º 1
0
            public void ProperlyInitializeProperties_WhenCalledWithDisable()
            {
                // Arrange
                SUT action = new SUT(Tools.GetXmlFragment("ChangeServiceActionDisable.CustAct"));

                // Act

                // Assert
                Assert.AreEqual(action.ServiceName, "AdobeARMservice");
                Assert.AreEqual(action.Mode, "Disabled");
            }
Exemplo n.º 2
0
            public void ChangeTheStatTypeToDisabled_WhenCalledWithDisabled()
            {
                // Arrange
                SUT    action;
                string startType   = Tools.GetServiceStartType("AdobeARMservice");
                var    finalResult = Tools.GetReturnCodeAction();

                if (startType == "Disabled")
                {
                    action = new SUT(Tools.GetXmlFragment("ChangeServiceActionManual.CustAct"));
                    action.Run(ref finalResult);
                    startType = Tools.GetServiceStartType("AdobeARMservice");
                    Assert.AreEqual("Manual", startType);
                }
                action = new SUT(Tools.GetXmlFragment("ChangeServiceActionDisable.CustAct"));

                // Act
                action.Run(ref finalResult);
                startType = Tools.GetServiceStartType(action.ServiceName);

                // Assert
                Assert.AreEqual("Disabled", startType);
            }