public static STwitchCommand[] CreateDefaults() { Array arr_enums = Enum.GetValues(typeof(ETwitchCommandType)); STwitchCommand[] arr = new STwitchCommand[arr_enums.Length]; for (int i = 0; i < arr.Length; i++) { arr[i] = STwitchCommand.CreateDefault((ETwitchCommandType)arr_enums.GetValue(i)); } return(arr); }
public void TestMethodSerArrayTwitchCommands() { ResetTestState(); Console.WriteLine(MethodBase.GetCurrentMethod().Name); STwitchCommand[] v1 = STwitchCommand.CreateDefaults(); string text = _serializer.SerializeToCascade(v1, this); Console.WriteLine(text); var v2 = _serializer.Deserialize <STwitchCommand[]>(text, this); CheckInternalErrors(); Assert.IsTrue(Utils.IsArrayEquals(v1, v2)); }