public void MakeStringRgch_EmptyTextValidWS_ReturnsCorrectString() { var tsf = new TsStrFactory(); ITsString tss = tsf.MakeStringRgch(string.Empty, 0, 1); Assert.That(tss.Text, Is.Null); Assert.That(tss.get_WritingSystem(0), Is.EqualTo(1)); }
public void MakeStringWithPropsRgch_NonEmptyTextPartialLengthValidProps_ReturnsCorrectString() { var tsf = new TsStrFactory(); ITsString tss = tsf.MakeStringWithPropsRgch("text", 2, new TsTextProps(1)); Assert.That(tss.Text, Is.EqualTo("te")); Assert.That(tss.get_WritingSystem(0), Is.EqualTo(1)); }
public void MakeStringRgch_NonEmptyTextWholeLengthValidWS_ReturnsCorrectString() { var tsf = new TsStrFactory(); ITsString tss = tsf.MakeStringRgch("text", 4, 1); Assert.That(tss.Text, Is.EqualTo("text")); Assert.That(tss.get_WritingSystem(0), Is.EqualTo(1)); }
public void EmptyString_ValidWS_ReturnsCorrectString() { var tsf = new TsStrFactory(); ITsString tss = tsf.EmptyString(1); Assert.That(tss.Text, Is.Null); Assert.That(tss.get_WritingSystem(0), Is.EqualTo(1)); }
public void MakeStringRgch_InvalidLength_Throws() { var tsf = new TsStrFactory(); Assert.That(() => tsf.MakeStringRgch(string.Empty, 1, 1), Throws.InstanceOf <ArgumentOutOfRangeException>()); }
public void MakeString_ZeroWS_Throws() { var tsf = new TsStrFactory(); Assert.That(() => tsf.MakeString(string.Empty, 0), Throws.InstanceOf <ArgumentOutOfRangeException>()); }
public void MakeStringWithPropsRgch_NullProps_Throws() { var tsf = new TsStrFactory(); Assert.That(() => tsf.MakeStringWithPropsRgch(string.Empty, 0, null), Throws.InstanceOf <ArgumentNullException>()); }