Exemplo n.º 1
0
        public void Test_MaxLength_VstFileType_Name()
        {
            VstFileType ft = new VstFileType();

            Assert.AreEqual(null, ft.Name);

            ft.Name = String.Empty;
            Assert.AreEqual(String.Empty, ft.Name);

            string testData = CreateString(Constants.MaxFileTypeName);

            ft.Name = testData;
            Assert.AreEqual(testData, ft.Name);

            testData += "X";
            ft.Name   = testData;
            Assert.Fail("should have thrown an exception.");
        }
Exemplo n.º 2
0
        public void Test_MaxLength_VstFileType_Extension()
        {
            var ft = new VstFileType();

            ft.Extension.Should().BeEmpty();

            ft.Extension = String.Empty;
            ft.Extension.Should().BeEmpty();

            string testData = CreateString(Constants.MaxFileTypeExtension);

            ft.Extension = testData;
            ft.Extension.Should().Be(testData);

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