public RequestModelBinder(
     IRequestMetaDeserializer requestSerializer,
     RequestSchemaVersionAccessor requestVersionAccessor)
 {
     this.requestSerializer            = requestSerializer;
     this.requestSchemaVersionAccessor = requestVersionAccessor;
 }
        public RequestModelBinderSpec()
        {
            this.requestMetaDeserializer = Substitute.For <IRequestMetaDeserializer>();
            this.versionAccessor         = Substitute.For <RequestSchemaVersionAccessor>();
            this.modelBinder             = new RequestModelBinder(
                this.requestMetaDeserializer,
                this.versionAccessor);
            this.context = Substitute.For <ModelBindingContext>();

            this.context.ModelType.Returns(typeof(PublishSchemeRequest));
            this.context.ModelState    = new ModelStateDictionary();
            this.context.BindingSource = BindingSource.Body;

            this.versionAccessor.GetSchemaVersion(this.context).Returns(this.testSchemaVersion);
        }