public void GivenIAddAnEmbeddedResourceToTheHalDocumentT() { HalDocument document = this.scenarioContext.Get <HalDocument>(); IHalDocumentFactory halDocumentFactory = ContainerBindings.GetServiceProvider(this.scenarioContext).GetService <IHalDocumentFactory>(); document.AddEmbeddedResource("somerel", halDocumentFactory.CreateHalDocument()); }
public void GivenIHaveCreatedAnInstanceOfHalDocumentFromTheDomainClass() { IHalDocumentFactory halDocumentFactory = ContainerBindings.GetServiceProvider(this.scenarioContext).GetService <IHalDocumentFactory>(); HalDocument halDocument = halDocumentFactory.CreateHalDocumentFrom(this.scenarioContext.Get <TestDomainClass>()); this.scenarioContext.Set(halDocument); }
/// <summary> /// Initializes a new instance of the <see cref="ContentResponseMapper"/> class. /// </summary> /// <param name="halDocumentFactory">The factory with which to create <see cref="HalDocument"/> instances.</param> /// <param name="linkResolver">The link resolver to build the links collection.</param> /// <param name="contentStateMapper">The mapper for individual <see cref="ContentState"/> items.</param> public ContentStatesResponseMapper( IHalDocumentFactory halDocumentFactory, IOpenApiWebLinkResolver linkResolver, ContentStateResponseMapper contentStateMapper) { this.halDocumentFactory = halDocumentFactory; this.linkResolver = linkResolver; this.contentStateMapper = contentStateMapper; }
/// <summary> /// Initializes a new instance of the <see cref="SmsTemplateMapper"/> class. /// </summary> /// <param name="halDocumentFactory">The service provider to construct <see cref="HalDocument"/> instances.</param> /// <param name="openApiWebLinkResolver">The link resolver.</param> public SmsTemplateMapper( IHalDocumentFactory halDocumentFactory, IOpenApiWebLinkResolver openApiWebLinkResolver) { this.halDocumentFactory = halDocumentFactory ?? throw new ArgumentNullException(nameof(halDocumentFactory)); this.openApiWebLinkResolver = openApiWebLinkResolver ?? throw new ArgumentNullException(nameof(openApiWebLinkResolver)); }
/// <summary> /// Initializes a new instance of the <see cref="UserNotificationsMapper"/> class. /// </summary> /// <param name="halDocumentFactory">The service provider to construct <see cref="HalDocument"/> instances.</param> /// <param name="openApiWebLinkResolver">The link resolver.</param> /// <param name="userNotificationMapper">The user notification mapper.</param> public UserNotificationsMapper( IHalDocumentFactory halDocumentFactory, IOpenApiWebLinkResolver openApiWebLinkResolver, UserNotificationMapper userNotificationMapper) { this.halDocumentFactory = halDocumentFactory ?? throw new ArgumentNullException(nameof(halDocumentFactory)); this.openApiWebLinkResolver = openApiWebLinkResolver ?? throw new ArgumentNullException(nameof(openApiWebLinkResolver)); this.userNotificationMapper = userNotificationMapper ?? throw new ArgumentNullException(nameof(userNotificationMapper)); }
/// <summary> /// Initializes a new instance of the <see cref="TenantCollectionResultMapper"/> class. /// </summary> /// <param name="halDocumentFactory">The service provider to construct <see cref="HalDocument"/> instances.</param> /// <param name="linkResolver">The link resolver to build the links collection.</param> public TenantCollectionResultMapper(IHalDocumentFactory halDocumentFactory, IOpenApiWebLinkResolver linkResolver) { this.halDocumentFactory = halDocumentFactory; this.linkResolver = linkResolver; }
/// <summary> /// Initializes a new instance of the <see cref="ContentSummaryResponseMapper"/> class. /// </summary> /// <param name="halDocumentFactory">The factory with which to create <see cref="HalDocument"/> instances.</param> /// <param name="linkResolver">The link resolver to build the links collection.</param> public ContentSummaryResponseMapper(IHalDocumentFactory halDocumentFactory, IOpenApiWebLinkResolver linkResolver) { this.halDocumentFactory = halDocumentFactory; this.linkResolver = linkResolver; }
/// <summary> /// Initializes a new instance of the <see cref="HalDocumentJsonConverter"/> class. /// </summary> /// <param name="halDocumentFactory">The <see cref="IHalDocumentFactory"/>.</param> public HalDocumentJsonConverter(IHalDocumentFactory halDocumentFactory) { this.halDocumentFactory = halDocumentFactory; }
/// <summary> /// Initializes a new instance of the <see cref="PetListResourceMapper"/> class. /// </summary> /// <param name="halDocumentFactory">The factoryh with which to create <see cref="HalDocument"/> instances.</param> /// <param name="linkResolver">The link resolver to build the links collection.</param> /// <param name="petResourceMapper">The mapper for individual Pets.</param> public PetListResourceMapper(IHalDocumentFactory halDocumentFactory, IOpenApiWebLinkResolver linkResolver, PetResourceMapper petResourceMapper) { this.halDocumentFactory = halDocumentFactory; this.linkResolver = linkResolver; this.petResourceMapper = petResourceMapper; }