Exemplo n.º 1
0
        /// <summary>
        ///     Register instances for the given <see cref="AutoDataTestMethodAttribute" />
        ///     parameters inside AutoFixture. This makes sure that the custom
        ///     attributes <see cref="BeNullAttribute" /> and <see cref="FreezeAttribute" />
        ///     used for the parameters of the method are used.
        /// </summary>
        /// <param name="generator">
        ///     The generator is used to create the SUT.
        /// </param>
        private void ProcessAutoTestDataParameters(IArgumentsGenerator generator)
        {
            var methodType = typeof(AutoDataTestMethodAttribute);

            var parameterInfos = _attributeFinder.Find(methodType);

            foreach (var parameterInfo in parameterInfos)
            {
                generator.CreateOtherArgument(parameterInfo);
            }
        }