예제 #1
0
        public void Load_Operation_Gets_File_Content_Into_StringArray()
        {
            string testFileContent = "Line 1" + Environment.NewLine + "Line 2 Line 2" + Environment.NewLine + "Line 3 Line 3 Line 3";

            File.WriteAllText(testProtocolFilePath, testFileContent);

            ProtocolReader protocolReader = new ProtocolReader(testProtocolFilePath);

            protocolReader.Load();

            CollectionAssert.AreEqual(testFileContent.Split(new string[] { Environment.NewLine }, StringSplitOptions.None), protocolReader.LinesFromFile);
        }
예제 #2
0
        public void ProtocolReader_Is_Created_With_A_Complete_Filepath()
        {
            ProtocolReader protocolReader = new ProtocolReader(testProtocolFilePath);

            Assert.AreEqual(testProtocolFilePath, protocolReader.FilePath);
        }