コード例 #1
0
            public void ProperlyInitializeProperties_WhenCalled()
            {
                // Arrange
                SUT action = new SUT(Tools.GetXmlFragment("StartService.CustAct"));

                // Act

                // Assert
                Assert.AreEqual(action.ServiceName, "AdobeARMservice");
            }
コード例 #2
0
            public void DoesNotThrowException_WhenTheServiceDoesNotExists()
            {
                // Arrange
                SUT action      = new SUT(Tools.GetXmlFragment("StartServiceThatDoesNotExists.CustAct"));
                var finalResult = Tools.GetReturnCodeAction();

                // Act
                action.Run(ref finalResult);

                // Assert
            }
コード例 #3
0
            public void DoesNotChangeServiceState_WhenTheServiceIsAlreadyStarted()
            {
                // Arrange
                SUT action      = new SUT(Tools.GetXmlFragment("StartService.CustAct"));
                var finalResult = Tools.GetReturnCodeAction();

                // Act
                Tools.StartService(action.ServiceName);
                Assert.IsTrue(Tools.IsServiceRunning(action.ServiceName));
                action.Run(ref finalResult);

                // Assert
                Assert.IsTrue(Tools.IsServiceRunning(action.ServiceName));
            }
コード例 #4
0
            public void StartTheService_WhenCalledTheServiceIsStop()
            {
                // Arrange
                SUT action      = new SUT(Tools.GetXmlFragment("StartService.CustAct"));
                var finalResult = Tools.GetReturnCodeAction();

                // Act
                Tools.StopService(action.ServiceName);
                Assert.IsFalse(Tools.IsServiceRunning(action.ServiceName));
                action.Run(ref finalResult);

                // Assert
                Assert.IsTrue(Tools.IsServiceRunning(action.ServiceName));
            }