public static ISingleObjectBuilder <AanbodResponse> WithDefaults(
            this ISingleObjectBuilder <AanbodResponse> aanbodResponseBuilder, bool hasTuin = false)
        {
            if (aanbodResponseBuilder == null)
            {
                throw new ArgumentNullException(nameof(aanbodResponseBuilder));
            }

            var objects = new Builder().CreateListOfSize <Object>(5).WithDefaults(hasTuin).Build().ToArray();

            return(aanbodResponseBuilder
                   .With(x => x.objects = objects));
        }
Example #2
0
        public static ISingleObjectBuilder <GetTopMakelaarsResponse> WithDefaults(
            this ISingleObjectBuilder <GetTopMakelaarsResponse> getTopMakelaarResponseBuilder, bool hasTuin = false)
        {
            if (getTopMakelaarResponseBuilder == null)
            {
                throw new ArgumentNullException(nameof(getTopMakelaarResponseBuilder));
            }

            var topMakelaars = new Builder().CreateListOfSize <TopMakelaar>(1).WithDefaults().Build().ToList();

            return(getTopMakelaarResponseBuilder
                   .With(x => x.topMakelaars = topMakelaars));
        }
Example #3
0
 public ParticipantSummaryResponseBuilder WithStatus(ParticipantState state)
 {
     _participant.With(x => x.Status = state);
     return(this);
 }
Example #4
0
 public ParticipantDetailsResponseBuilder WithStatus(ParticipantState state)
 {
     _participant.With(x => x.CurrentStatus = state);
     return(this);
 }
Example #5
0
 public static ISingleObjectBuilder <T> WithValidData <T>(this ISingleObjectBuilder <T> value)
 {
     return(value.With(ValidData));
 }
Example #6
0
        public void ShouldBeAbleToUseWith()
        {
            objectBuilder.With(func).Returns(objectBuilder);

            SingleObjectBuilderExtensions.With(objectBuilder, func);
        }
Example #7
0
 public CallbackEventRequestBuilder WithRoomType(RoomType roomType)
 {
     _request.With(x => x.TransferFrom = roomType);
     _request.With(x => x.TransferTo   = roomType);
     return(this);
 }
Example #8
0
 public static T BuildNew <T>(this ISingleObjectBuilder <T> builder) where T : ModelBase, new()
 {
     return(builder.With(c => c.Id = 0).Build());
 }
 public ISingleObjectBuilder <T> With <TFunc>(Func <T, TFunc> func)
 {
     return(_builderInstance.With(func));
 }