public async Task GenericStructISetWrapperT()
        {
            {
                GenericStructISetWrapper <int> obj = new GenericStructISetWrapper <int>()
                {
                    10, 20
                };
                Assert.Equal("[10,20]", await JsonSerializerWrapperForString.SerializeWrapper(obj));
            }

            {
                GenericStructISetWrapper <int> obj = default;
                Assert.Equal("[]", await JsonSerializerWrapperForString.SerializeWrapper(obj));
            }
        }
Exemple #2
0
        public static void GenericStructISetWrapperT()
        {
            {
                GenericStructISetWrapper <int> obj = new GenericStructISetWrapper <int>()
                {
                    10, 20
                };
                Assert.Equal("[10,20]", JsonSerializer.Serialize(obj));
            }

            {
                GenericStructISetWrapper <int> obj = default;
                Assert.Equal("[]", JsonSerializer.Serialize(obj));
            }
        }
Exemple #3
0
 public void Initialize()
 {
     List = new GenericStructIListWrapper <int>()
     {
         10
     };
     Collection = new GenericStructICollectionWrapper <int>()
     {
         30
     };
     Set = new GenericStructISetWrapper <int>()
     {
         50
     };
     Dictionary = new GenericStructIDictionaryWrapper <string, string>()
     {
         { "key1", "value1" }
     };
 }