コード例 #1
0
        public static IEnumerable <object[]> FactoriesWithNullableFillingDisabled()
        {
            var customizedBehavior = new FillWithEmptyValuesBehavior(options => options.FillNullables = false);

            return(new List <object[]>
            {
                new object[] { new CustomerFactory(customizedBehavior) },
                new object[] { MagicFactory.For <Customer>().WithBehavior(customizedBehavior) }
            });
        }
コード例 #2
0
        public static IEnumerable <object[]> FactoriesWithDefaultBehavior()
        {
            var customizedBehavior = new FillWithEmptyValuesBehavior();

            return(new List <object[]>
            {
                new object[] { new CustomerFactory(customizedBehavior) },
                new object[] { MagicFactory.For <Customer>().WithBehavior(customizedBehavior) }
            });
        }
コード例 #3
0
 public CustomerFactory(FillWithEmptyValuesBehavior behavior)
 {
     _behavior = behavior;
 }