示例#1
0
 public void Modulus10_WhenStringHasInvalidLength_ThrowsException(string chars)
 {
     // Arrange
     // Act
     // Assert
     Assert.That(() => CalcUtility.CheckDigitForIsbn13(chars), Throws.InstanceOf <ArgumentException>());
 }
示例#2
0
        public char Modulus10_WhenStringHasValidLength_ReturnsCheckDigit(string chars)
        {
            // Arrange
            var digits = Regex.Replace(chars, "[^0-9]+", string.Empty).Take(12);

            // Act
            // Assert
            return(CalcUtility.CheckDigitForIsbn13(digits));
        }
        public static void TouDataProcessing(List <string> filePaths)
        {
            var lpFiles = filePaths.Where(x => x.Contains("TOU")).ToList();

            foreach (var file in lpFiles)
            {
                List <LpDataItem> lpDataRecs = new LpFileReader().Read(file);
                double            lpMedian   = CalcUtility.getMedianLp(lpDataRecs);
                var listOfRecordsToWrite     = ConsoleWriter.GetListOfLpRecordsToWrite(lpDataRecs, lpMedian);
                ConsoleWriter.WriteLpData(lpDataRecs, lpMedian, FileUtil.getFileName(file));
            }
        }