Customize properties Values #1408
-
Hi, I have this code
What is the best way to send With as a parameter maybe something like As Tuple I tried to use .Do(action) but it did not work since it is not meant to assign values. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@Jimmy-Ahmed there is no built-in way to implement this using AutoFixture, but I think you might be able to pass an array of delegates that can "pipe" the With expressions. var mc = fixture.Build<DeploymentDetails>()
.With(x => x.Abc, "dsfsf564564")
.With(x => x.Def, "ddds")
.With(x => x.Tyr, "weewwe")
.With(x => x.Nhgf, "aaddw")
.Create(); |
Beta Was this translation helpful? Give feedback.
@Jimmy-Ahmed there is no built-in way to implement this using AutoFixture, but I think you might be able to pass an array of delegates that can "pipe" the With expressions.
What exactly are you trying to accomplish? Feels like you actually want to use the object builder.