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); }
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); }