public void FilePosition_OnFileWithMixedCharactersAndNewLines_WorksCorrectly(int position, int linenumber, int lineposition)
        {
            string input = "012\n456\n89";

            var calculator = new FilePositionCalculator(input);

            Assert.That(calculator.FilePosition(position), Is.EqualTo(new FilePosition(linenumber, lineposition)));
        }
        public void IfTheRequestedFilePosition_IsBeyondTheEndOfTheFile_TheResultIsAsIfTheFileHadBeenExtendedWithCharactersOnItsFinalLine()
        {
            string input = "012\n456\n89";

            var calculator = new FilePositionCalculator(input);

            Assert.That(calculator.FilePosition(10), Is.EqualTo(new FilePosition(3, 3)));
        }
        public void FilePosition_OnFileWithOnlyNewLines_WorksCorrectly(int position, int linenumber, int lineposition)
        {
            string input = "\n\n\n\n\n";

            var calculator = new FilePositionCalculator(input);

            Assert.That(calculator.FilePosition(position), Is.EqualTo(new FilePosition(linenumber, lineposition)));
        }