Ejemplo n.º 1
0
        public void ShouldContainExpectedFormSections()
        {
            var descriptor = FormLayoutDescriptor.Build(typeof(TestForm));

            descriptor?.HasSections().Should().BeFalse();
            descriptor?.Sections.Should().HaveCount(0);
        }
Ejemplo n.º 2
0
        public void ShouldContainExpectedFormPropertiesWithConditionalTriggerMetadata()
        {
            var descriptor = FormLayoutDescriptor.Build(typeof(TestForm));

            var conditionalTriggers = descriptor?.Properties.Select(p => p.GetConditionalTrigger()).Where(s => s != null).ToList();
            var conditionalTrigger  = conditionalTriggers.FirstOrDefault();

            conditionalTriggers.Should().HaveCount(1);

            conditionalTrigger.Should().Be("TextField");
        }
Ejemplo n.º 3
0
        public void ShouldContainExpectedFormProperties()
        {
            var descriptor = FormLayoutDescriptor.Build(typeof(TestForm));

            descriptor?.Properties.Should().HaveCount(1);
        }
Ejemplo n.º 4
0
        public void ShouldContainExpectedFormNameValue()
        {
            var descriptor = FormLayoutDescriptor.Build(typeof(TestForm));

            descriptor?.Name.Should().Be(TestFormName);
        }