Example #1
0
        public void Should_Open_Reader_When_Mode_Is_Read()
        {
            //Arrange
            _csvReader       = Substitute.For <ICSVReader>();
            _csvWriter       = Substitute.For <ICSVWriter>();
            _csvReaderWriter = new CSVReaderWriter(_csvReader, _csvWriter);

            //Act
            _csvReaderWriter.Open(FilePath, CSVReaderWriter.Mode.Read);

            //Assert
            _csvReader.Received().Open(FilePath);
            _csvWriter.DidNotReceive().Open(FilePath);
        }