GetConfigurationDataModel_WhenCorrectModelAvailable_ReturnsExpectedObject(
            ILayer initialLayer,
            ConfigurationLayerManager manager)
        {
            //arrange
            var configurationValue = 1;
            var firstConfiguration = new Configuration
            {
                ConfigurationId = "Test1", ConfigurationValue = configurationValue
            };

            Mock.Get(initialLayer)
            .Setup(f => f.TryGetConfigurationById(firstConfiguration.ConfigurationId, out firstConfiguration))
            .Returns(true);


            manager.AddLayer(initialLayer);
            var expectedModel = new TestModel {
                Test1 = configurationValue
            };
            var model = new TestModel();

            //act
            manager.GetConfigurationDataModel(ref model);

            //assert
            model.Should().BeEquivalentTo(expectedModel);
        }
        GetConfigurationDataModel_WhenConfigurationsNotAvailable_ThrowsAggregatedException(
            [Frozen] ILayer initialLayer,
            ConfigurationLayerManager manager)
        {
            //arrange
            Mock.Get(initialLayer)
            .Setup(f => f.TryGetConfigurationById(It.IsAny <string> (), out It.Ref <Configuration> .IsAny))
            .Returns(false);

            manager.AddLayer(initialLayer);
            var model = new IncorrectTestModel();

            //act
            Action getIncorrectModel = () => manager.GetConfigurationDataModel(ref model);

            //assert
            getIncorrectModel.Should().Throw <AggregateException> ();
        }