Exemplo n.º 1
0
        /// <summary>
        /// Allows the <see cref="IFixture"/> to be created using customizations from the method's assembly and a collection of <see cref="Type"/>s' assemblies.
        /// </summary>
        /// <param name="types">A collection of types used to infer the assemblies where <see cref="ICustomization"/>s and <see cref="ISpecimenBuilder"/>s reside.</param>
        public AutoFixtureAttribute(Type[] types)
        {
            IEnumerable <Assembly> assemblies = types.Select(x => x.Assembly);

            foreach (Assembly assembly in assemblies)
            {
                LoadingAssemblies.Add(assembly);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Allows the <see cref="IFixture"/> to be created using customizations from the method's assembly and the <see cref="Type"/>'s assembly.
 /// </summary>
 /// <param name="type">The type used to infer the assembly where <see cref="ICustomization"/>s and <see cref="ISpecimenBuilder"/>s reside.</param>
 public AutoFixtureAttribute(Type type)
 {
     LoadingAssemblies.Add(type.Assembly);
 }