Exemple #1
0
 public void get_by_bytes_large_data()
 {
     var guids = new List<Guid>();
     for (var i = 0; i < 60000; i++)
     {
          guids.Add(Guid.NewGuid());
     }
     var largeTarget = new JsonLargeUtilTarget
     {
         Guids = guids
     };
     var json = JsonUtil.ToJson(largeTarget);
     var bytes = Encoding.Default.GetBytes(json);
     JsonUtil.Get<JsonLargeUtilTarget>(bytes).Guids.Count.ShouldEqual(60000);
 }
Exemple #2
0
 public void can_handle_large_data_objects()
 {
     Assert.DoesNotThrow(() =>
     {
         var guids = new List <Guid>();
         for (var i = 0; i < 60000; i++)
         {
             guids.Add(Guid.NewGuid());
         }
         var large = new JsonLargeUtilTarget
         {
             Guids = guids
         };
         JsonUtil.ToJson(large).ShouldNotBeEmpty();
     });
 }
Exemple #3
0
 public void can_handle_large_data_objects()
 {
     Assert.DoesNotThrow(() =>
     {
         var guids = new List<Guid>();
         for (var i = 0; i < 60000; i++)
         {
             guids.Add(Guid.NewGuid());
         }
         var large = new JsonLargeUtilTarget
         {
             Guids = guids
         };
         JsonUtil.ToJson(large).ShouldNotBeEmpty();
     });
 }
Exemple #4
0
        public void get_by_bytes_large_data()
        {
            var guids = new List <Guid>();

            for (var i = 0; i < 60000; i++)
            {
                guids.Add(Guid.NewGuid());
            }
            var largeTarget = new JsonLargeUtilTarget
            {
                Guids = guids
            };
            var json  = JsonUtil.ToJson(largeTarget);
            var bytes = Encoding.Default.GetBytes(json);

            JsonUtil.Get <JsonLargeUtilTarget>(bytes).Guids.Count.ShouldEqual(60000);
        }