public void Attributes_must_keep_the_outermost_attribute_as_the_least_specific() { var task = Source.Empty <NotUsed>() .ToMaterialized(AttributesSink.Create(), Keep.Right) .WithAttributes(Attributes.CreateName("new-name")) .Run(Materializer); task.AwaitResult().GetAttribute <Attributes.Name>().Value.Should().Contain("attributesSink"); }
public void Attributes_must_be_overridable_on_a_module_basis() { var runnable = Source.Empty <NotUsed>() .ToMaterialized(AttributesSink.Create().WithAttributes(Attributes.CreateName("new-name")), Keep.Right); var task = runnable.Run(Materializer); task.AwaitResult().GetAttribute <Attributes.Name>().Value.Should().Contain("new-name"); }
public void Attributes_must_keep_the_outermost_attribute_as_the_least_specific() { var runnable = RunnableGraph.FromGraph( Source.Empty <NotUsed>() .ToMaterialized(AttributesSink.Create(), Keep.Right) .WithAttributes(Attributes.CreateName("new-name"))); var task = runnable.Run(Materializer); task.Wait(TimeSpan.FromSeconds(3)).Should().BeTrue(); task.Result.GetAttribute <Attributes.Name>().Value.Should().Contain("attributesSink"); }