static void Main(string[] args) { string jsonString = string.Empty; if (GetJsonString.ReadFromFile(@".\..\..\JSON.txt", out jsonString) == false) { return; } JsonModel model = JsonToModel.StringToModel(jsonString); try { ResultOutput.Print(model.arrayOne, "ArrayOne"); ResultOutput.Print(model.arrayTwo, "ArrayTwo"); var Info = new InfoStr(); ResultOutput.Print(TestRequest.GetUniqueValues(model.arrayOne, model.arrayTwo), Info.uniqueStr); ResultOutput.Print(TestRequest.GetOddNumbers(model.arrayOne, model.arrayTwo), Info.oddNbrStr); ResultOutput.Print(TestRequest.GetEvenNbrSum(model.arrayOne, model.arrayTwo), Info.sumStr); } catch (ArgumentNullException) { Console.WriteLine("EmptyArray"); } catch (OverflowException) { Console.WriteLine("Overflow!"); } Console.ReadLine(); }
public void IncorrectInputString() { string jsonString = null; JsonModel expected = null; JsonModel model = JsonToModel.StringToModel(jsonString); //assert Assert.AreEqual(expected, model); }