Inheritance: IServiceHookHandler
コード例 #1
0
        public void TryParseDeploymentInfoShouldReturnProcessDeployment()
        {
            var oneDriveHandler = new OneDriveHandler(Mock.Of<ITracer>(), Mock.Of<IDeploymentStatusManager>(), Mock.Of<IDeploymentSettingsManager>(), Mock.Of<IEnvironment>());
            JObject payload = JObject.FromObject(new { RepositoryUrl = "https://api.onedrive.com", AccessToken = "one-drive-access-token" });
            DeploymentInfo deploymentInfo = null;

            DeployAction result = oneDriveHandler.TryParseDeploymentInfo(null, payload, null, out deploymentInfo);
            Assert.Equal(DeployAction.ProcessDeployment, result);
        }
コード例 #2
0
        public void TryParseDeploymentInfoShouldReturnUnknownPayload()
        {
            var oneDriveHandler = new OneDriveHandler(Mock.Of<ITracer>(), Mock.Of<IDeploymentStatusManager>(), Mock.Of<IDeploymentSettingsManager>(), Mock.Of<IEnvironment>());
            JObject payload = JObject.FromObject(new { });
            DeploymentInfo deploymentInfo = null;

            DeployAction result = oneDriveHandler.TryParseDeploymentInfo(null, payload, null, out deploymentInfo);
            Assert.Equal(DeployAction.UnknownPayload, result);
        }