Exemplo n.º 1
0
        protected override void configureDocumentsAre(ObjectConstructionExpression <Target> _)
        {
            _.WithInput <string>("Name").Configure((target, name) =>
            {
                IdToName[target.Id] = name;
            }).Header("Document Name");

            _.SetProperty(x => x.Number).DefaultValue("1");
            _.SetProperty(x => x.Long).DefaultValue("1");
            _.SetProperty(x => x.String).DefaultValue("Max");
            _.SetProperty(x => x.Flag).DefaultValue("false");
            _.SetProperty(x => x.Double).DefaultValue("1");
            _.SetProperty(x => x.Decimal).DefaultValue("1");
            _.SetProperty(x => x.Date).DefaultValue("TODAY");

            _.WithInput <bool>("InnerFlag").Configure((target, flag) =>
            {
                if (target.Inner == null)
                {
                    target.Inner = new Target();
                }

                target.Inner.Flag = flag;
            });
        }
Exemplo n.º 2
0
        protected override void configureDocumentsAre(ObjectConstructionExpression <Target> _)
        {
            _.WithInput <string>("Name").Configure((target, name) =>
            {
                IdToName[target.Id] = name;
            }).Header("Document Name");

            _.SetProperty(x => x.Number).DefaultValue("1");
            _.SetProperty(x => x.Long).DefaultValue("1");
            _.SetProperty(x => x.String).DefaultValue("Max");
        }