public void GivenDataPathAndFileNameThatDoesntExistWhenReadThenReturnedEmpty()
        {
            _dataPath = "blarg";
            _fileName = "false";

            var result = _binaryReader.Read(_dataPath, _fileName, _tim);

            Assert.IsEmpty(result);
        }
Beispiel #2
0
        private static void AreEqual(OperationData operationData, List <TimeScope> timeScopes, TLG tlg, string cardPath)
        {
            var fileName             = tlg.A + ".xml";
            var tlgXmlHeaderFilePath = Path.Combine(cardPath, "TASKDATA", fileName);

            Assert.IsTrue(File.Exists(tlgXmlHeaderFilePath));

            var tims = new XmlReader().ReadTlgXmlData(cardPath, fileName);

            TimAssert.AreEqual(timeScopes, tims);

            var sections            = operationData.GetAllSections();
            var meters              = sections.SelectMany(x => x.GetWorkingDatas()).ToList();
            var adaptSpatialRecords = operationData.GetSpatialRecords();
            var binaryReader        = new BinaryReader();
            var isoSpatialRecords   = binaryReader.Read(cardPath, tlg.A + ".bin", tims.First());

            IsoSpatialRecordAssert.AreEqual(adaptSpatialRecords, meters, isoSpatialRecords);
        }