public async Task Should_enrich_content_with_status_color() { var content = CreateContent(); A.CallTo(() => contentWorkflow.GetInfoAsync(content)) .Returns(new StatusInfo(Status.Published, StatusColors.Published)); await sut.EnrichAsync(requestContext, new[] { content }, schemaProvider); Assert.Equal(StatusColors.Published, content.StatusColor); }
public async Task Should_enrich_content_with_next_statuses() { var content = new ContentEntity { SchemaId = schemaId }; var nexts = new[] { new StatusInfo(Status.Published, StatusColors.Published) }; A.CallTo(() => workflow.GetNextAsync(content, content.Status, requestContext.User)) .Returns(nexts); await sut.EnrichAsync(requestContext, new[] { content }, null !); Assert.Equal(nexts, content.NextStatuses); }
public async Task Should_enrich_content_with_status_color() { var content = new ContentEntity { SchemaId = schemaId }; A.CallTo(() => contentWorkflow.GetInfoAsync(content, content.Status)) .Returns(new StatusInfo(Status.Published, StatusColors.Published)); await sut.EnrichAsync(requestContext, new[] { content }, null !); Assert.Equal(StatusColors.Published, content.StatusColor); }