Beispiel #1
0
        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));
        }
Beispiel #2
0
        public void MakeStringRgch_NonEmptyTextPartialLengthValidWS_ReturnsCorrectString()
        {
            var       tsf = new TsStrFactory();
            ITsString tss = tsf.MakeStringRgch("text", 2, 1);

            Assert.That(tss.Text, Is.EqualTo("te"));
            Assert.That(tss.get_WritingSystem(0), Is.EqualTo(1));
        }
Beispiel #3
0
        public void MakeStringRgch_InvalidLength_Throws()
        {
            var tsf = new TsStrFactory();

            Assert.That(() => tsf.MakeStringRgch(string.Empty, 1, 1), Throws.InstanceOf <ArgumentOutOfRangeException>());
        }