public void LoadConfiguration() { var specimenContext = new SpecimenContext(CreateAutoFixture()); var microComponents = new[] { specimenContext.Create <IMicroComponent>(), specimenContext.Create <IMicroComponent>(), specimenContext.Create <IMicroComponent>() }; var configuration = MicroComponentEnumerableConverter.Serialize(microComponents); var sut = new MicroPipeline(); sut.LoadConfiguration(configuration); sut.Components.Should().BeEquivalentTo(microComponents.Cast <object>(), o => o.IncludingProperties()); }
public void SaveConfiguration() { var specimenContext = new SpecimenContext(CreateAutoFixture()); var microComponents = new[] { specimenContext.Create <IMicroComponent>(), specimenContext.Create <IMicroComponent>(), specimenContext.Create <IMicroComponent>() }; var sut = new MicroPipeline { Components = microComponents }; var configuration = sut.SaveConfiguration(); configuration.Should().Be(MicroComponentEnumerableConverter.Serialize(microComponents)); }
public string SaveConfiguration() { return(MicroComponentEnumerableConverter.Serialize(Components)); }