Ejemplo n.º 1
0
        public void CanWriteCorrectData()
        {
            //Arrange
            var sut = new DataWriter(_path, "TST", 20170101, "na", DataType.Unknown);

            //Act
            _inputDataPoints.ForEach(x => sut.Feed(x));

            //Assert
            sut.Count.Should().Be(_inputDataPoints.Count);
        }
Ejemplo n.º 2
0
        public void HasCorrectFileName()
        {
            //Arrange
            var sut = new DataWriter(_path, "TST", 20170101, "na", DataType.Unknown);

            //Act
            _inputDataPoints.ForEach(x => sut.Feed(x));

            //Assert
            var fileInfo = new FileInfo(sut.Filepath);

            fileInfo.Extension.Should().Be("DAT");
            fileInfo.Name.Should().Be("");
            fileInfo.DirectoryName.Should().Be("");
            fileInfo.Directory.Parent.Name.Should().Be("");
        }