Exemple #1
0
        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));
        }
Exemple #2
0
        public void MakeStringWithPropsRgch_EmptyTextValidProps_ReturnsCorrectString()
        {
            var       tsf = new TsStrFactory();
            ITsString tss = tsf.MakeStringWithPropsRgch(string.Empty, 0, new TsTextProps(1));

            Assert.That(tss.Text, Is.Null);
            Assert.That(tss.get_WritingSystem(0), Is.EqualTo(1));
        }
Exemple #3
0
        public void MakeStringWithPropsRgch_NullProps_Throws()
        {
            var tsf = new TsStrFactory();

            Assert.That(() => tsf.MakeStringWithPropsRgch(string.Empty, 0, null), Throws.InstanceOf <ArgumentNullException>());
        }
Exemple #4
0
        public void MakeStringWithPropsRgch_InvalidLength_Throws()
        {
            var tsf = new TsStrFactory();

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