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)); } }
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)); } }
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" } }; }