Ejemplo n.º 1
0
        public void Creates_IonReader_For_Existing_File_Path()
        {
            var actual = IonReaderFactory.Create(FileLoader.GetExamplesIonPath());

            Expect(actual, Is.Not.Null);
            Expect(actual, Is.TypeOf <IonReader>());
        }
Ejemplo n.º 2
0
 public void Creates_IonReader_For_FileStream()
 {
     using FileStream fileStream = new FileStream(FileLoader.GetExamplesIonPath(), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
     using var ionReader         = IonReaderFactory.Create(fileStream);
     Expect(ionReader, Is.Not.Null);
     Expect(ionReader, Is.TypeOf <IonReader>());
 }
Ejemplo n.º 3
0
        public void Before_All_Test()
        {
            this.target = IonReaderFactory.Create(FileLoader.GetExamplesIonPath());

            this.assertions = new List <Action>
            {
                IsSectionHeader_InFirstLine,
                IsProperty_InSecondLine,
                IsProperty_InThirdLine,
                IsEmptyLine_InFourthLine,
                IsProperty_InFifthLine,
                IsEmptyLine_InSixthLine,
                IsSectionHeader_InSeventhLine,
                IsTableRow_InEighthLine,
                IsTableHeaderSeparatorRow_InNinethLine,
                IsTableRow_InTenthLine,
                IsTableRow_InEleventhLine,
                IsEmptyLine_InTwelfthLine,
                IsEmptyLine_InThirteenthLine,
                IsEmptyLine_InFourteenthLine,
                IsSectionHeader_InFiftheenthLine,
                IsTableRow_InSixteenthLine,
                IsTableHeaderSeparatorRow_InSeventeenthLine,
                IsTableRow_InEighteenthLine,
            };
        }
Ejemplo n.º 4
0
        public void Creates_IonReader_For_MemoryStream()
        {
            var rawFileContent = Encoding.UTF8.GetBytes(File.ReadAllText(FileLoader.GetExamplesIonPath()));

            using MemoryStream fileStream = new MemoryStream(rawFileContent);
            using var ionReader           = IonReaderFactory.Create(fileStream);
            Expect(ionReader, Is.Not.Null);
            Expect(ionReader, Is.TypeOf <IonReader>());
        }