示例#1
0
        public void Test_MaxLength_VstPinProperties_ShortLabel()
        {
            VstPinProperties mpn = new VstPinProperties();

            Assert.AreEqual(null, mpn.ShortLabel);

            mpn.ShortLabel = String.Empty;
            Assert.AreEqual(String.Empty, mpn.ShortLabel);

            string testData = CreateString(Constants.MaxShortLabelLength);

            mpn.ShortLabel = testData;
            Assert.AreEqual(testData, mpn.ShortLabel);

            testData      += "X";
            mpn.ShortLabel = testData;
            Assert.Fail("should have thrown an exception.");
        }
示例#2
0
        public void Test_MaxLength_VstPinProperties_ShortLabel()
        {
            var mpn = new VstPinProperties();

            mpn.ShortLabel.Should().BeEmpty();

            mpn.ShortLabel = String.Empty;
            mpn.ShortLabel.Should().BeEmpty();

            string testData = CreateString(Constants.MaxShortLabelLength);

            mpn.ShortLabel = testData;
            mpn.ShortLabel.Should().Be(testData);

            testData      += "X";
            mpn.ShortLabel = testData;
            Assert.Fail("should have thrown an exception.");
        }