public void ProcessFile(string fileName, TextWriter outWriter) { var bigArray = new BitmaskUIntFinder(new Progress()); BitArrayUInt uInts; using (var stream = new StreamReader(new FileStream(fileName, FileMode.Open))) { uInts = bigArray.FindAllUInts(stream); } IEnumerable <GroupDescriptor> consecutiveGroups = _consecutivePartitioner.Partition(uInts.GetValuesFromArray()); WriteToFile(outWriter, consecutiveGroups); }
public void FindAllUIntsTest() { BitmaskUIntFinder cut = new BitmaskUIntFinder(Substitute.For <IProgress>()); BitArrayUInt uInts; using (StreamReader streamReader = GenerateStreamFromString("0 33 102345 99999911 2999991122")) { uInts = cut.FindAllUInts(streamReader); } Assert.IsTrue(uInts.Get(0)); Assert.IsTrue(uInts.Get(33)); Assert.IsTrue(uInts.Get(102345)); Assert.IsTrue(uInts.Get(99999911)); Assert.IsTrue(uInts.Get(2999991122)); }