Beispiel #1
0
        public void TestCreateFile()
        {
            var serial = new SerialToFileJSON();

            var result = serial.GetData();

            Assert.AreEqual(null, result);
        }
Beispiel #2
0
        public void TestWriteFileTwo()
        {
            var serial = new SerialToFileJSON();

            var result = serial.GetData();

            var elemenstToSafe = new List <Model.DataToSerialaize>();
            var elementToAdd   = new Model.DataToSerializeBuilder();

            elementToAdd.SetStatiscs(new Model.Statistics
            {
                Letters  = "43",
                Mistakes = "43",
                Time     = "123"
            }).SetSpeedWrite()
            .ReturnDataFromThis();
            elemenstToSafe.Add(new Model.DataToSerialaize(elementToAdd));
            serial.SafeData(elemenstToSafe);

            result = serial.GetData();
            Assert.AreEqual(elementToAdd.ToString(), result[0].ToString());
        }