コード例 #1
0
 public void SetUp()
 {
     this.typeMapper   = new Config().CreateSessionFactory().TypeMapper;
     this.deserializer =
         new PomonaJsonDeserializer(new ServerSerializationContextProvider(this.typeMapper, Substitute.For <IUriResolver>(),
                                                                           Substitute.For <IResourceResolver>(), new NoContainer()));
 }
コード例 #2
0
 public void SetUp()
 {
     var factory =
         new PomonaJsonSerializerFactory(new ClientSerializationContextProvider(this.clientTypeMapper,
             Substitute.For<IPomonaClient>()));
     this.deserializer = factory.GetDeserializer();
 }
コード例 #3
0
        public void SetUp()
        {
            var factory      = new PomonaJsonSerializerFactory();
            var pomonaClient = Substitute.For <IPomonaClient>();

            this.deserializer =
                factory.GetDeserializer(new ClientSerializationContextProvider(this.clientTypeMapper, pomonaClient, pomonaClient));
        }
コード例 #4
0
        private T Deserialize <T>(string jsonString)
        {
            var pomonaClient     = Substitute.For <IPomonaClient>();
            var jsonDeserializer = new PomonaJsonDeserializer(
                new ClientSerializationContextProvider(this.typeMapper,
                                                       pomonaClient,
                                                       pomonaClient));

            return(jsonDeserializer.DeserializeString <T>(jsonString));
        }