Esempio n. 1
0
        public void CreateRandomFile_creates_expected_number_of_lines()
        {
            // arrange
            var factory            = new QuoteFileFactory();
            var allowedIdentifiers = new List <string> {
                "MSFT", "CSCO", "AMZN", "SBUX"
            };
            var identifiers   = new Identifiers(allowedIdentifiers);
            var expectedLines = 100;

            // act
            var file = factory.CreateRandomFile(identifiers, expectedLines);

            // assert
            var fileContents = file.ToString();

            AssertHelper.AssertHasLines(fileContents, expectedLines);
        }