public void IgnoreFuriganaWithOnlyWhitespace() { var reading = "あの[ ]人[ひと]"; var furigana = new Furigana(reading); Assert.That(furigana.Reading, Is.EqualTo("あの 人[ひと]")); }
public void MultipleGemsInsideWord() { var reading = "黒[くろ]熊[くま]"; var furigana = new Furigana(reading); Assert.That(furigana.Reading, Is.EqualTo(reading)); }
public void FuriganaToHiragana() { var reading = "新[あたら]しい"; var furigana = new Furigana(reading); Assert.That(furigana.Hiragana, Is.EqualTo("あたらしい")); }
public void IgnoreEmptyFuriganaSection() { var reading = "あの[]人[ひと]"; var furigana = new Furigana(reading); Assert.That(furigana.Reading, Is.EqualTo("あの 人[ひと]")); }
public void FuriganaToExpression() { var reading = "動物[どうぶつ]"; var furigana = new Furigana(reading); Assert.That(furigana.Expression, Is.EqualTo("動物")); }
public void FuriganaToHtmlRuby() { var reading = "新[あたら]しい"; var result = "<ruby><rb>新</rb><rt>あたら</rt></ruby>しい"; var formatter = new Furigana(reading); Assert.That(formatter.ReadingHtml, Is.EqualTo(result)); }
public void NullReading() { var formatter = new Furigana(null); Assert.That(formatter.Reading, Is.EqualTo("")); Assert.That(formatter.Expression, Is.EqualTo("")); Assert.That(formatter.Hiragana, Is.EqualTo("")); Assert.That(formatter.ReadingHtml, Is.EqualTo("")); }
public void EmptyReading() { var reading = ""; var formatter = new Furigana(reading); Assert.That(formatter.Reading, Is.EqualTo("")); Assert.That(formatter.Expression, Is.EqualTo("")); Assert.That(formatter.Hiragana, Is.EqualTo("")); Assert.That(formatter.ReadingHtml, Is.EqualTo("")); }
public void SingleGemInMiddleOfWord() { var reading = "新[あたら]しい"; var furigana = new Furigana(reading); Assert.That(furigana.Reading, Is.EqualTo(reading)); }
public void ReadingsWithoutGemsDoNotChange() { var reading = "ライオン"; var furigana = new Furigana(reading); Assert.That(furigana.Reading, Is.EqualTo(reading)); }
public void SpaceCanBeDelimiterBetweenFuriganaSegments() { var reading = "あの 人[ひと]"; var furigana = new Furigana(reading); Assert.That(furigana.Reading, Is.EqualTo("あの 人[ひと]")); }
public void SingleGemThatSpansEntireWord() { var reading = "動物[どうぶつ]"; var furigana = new Furigana(reading); Assert.That(furigana.Reading, Is.EqualTo(reading)); }