public void ParameterSetupHelper_Set_ByType_TypeDoesntExistInParameters_Throws()
        {
            var parameters = new IParameter[0];
            var helper     = new ParameterSetupHelper(parameters);

            helper.Set <Interface1>(null);
        }
        public void ParameterSetupHelper_Set_ByName_NameExistsInParameters_IncorrectType_Throws()
        {
            var interface1 = Substitute.For <Interface1>();
            var interface2 = Substitute.For <Interface2>();
            var parameters = new[] { CreateParameter(interface1, "param1") };
            var helper     = new ParameterSetupHelper(parameters);

            helper.Set(interface2, "param1");
        }
        public void ParameterSetupHelper_Set_ByType_TypeExistsInParameters_ReplacesTheParameterValue()
        {
            var interface1         = Substitute.For <Interface1>();
            var interface1Override = Substitute.For <Interface1>();
            var parameters         = new[] { CreateParameter(interface1, "param1") };
            var helper             = new ParameterSetupHelper(parameters);

            helper.Set(interface1Override).Should().Be(interface1Override);
            helper.Get <Interface1>().Should().Be(interface1Override);
        }