public async Task GetCommandWithAliasReturnsItemFromUmbracoApi() { var service = Substitute.For<IContentTypeService>(); service.GetContentType(Arg.Any<string>()).Returns(Substitute.For<IContentType>()); var deliverable = new ContentTypeDeliverable( null, Substitute.For<TextWriter>(), service, null, null, null, null ); await deliverable.Run("", new[] { "get", "alias" }); service.Received().GetContentType(Arg.Any<string>()); }
public async Task GetAllCommandGetsAllFromUmbracoApi() { var service = Substitute.For<IContentTypeService>(); service.GetAllContentTypes().Returns(_ => Enumerable.Empty<IContentType>()); var deliverable = new ContentTypeDeliverable( null, Substitute.ForPartsOf<TextWriter>(), service, null, null, null, null ); await deliverable.Run("", new[] { "get-all" }); service.Received().GetAllContentTypes(); }