Пример #1
0
        public void NestedInfo()
        {
            ResourceListing listing = new ResourceListing();
            listing.Info = new Info() { Title = null };

            listing.Validate(Violations);
            AssertInvalidProperty("Info.Title", Common.Swagger.Common.ViolationLevel.Error);
        }
Пример #2
0
        public void NestedResource()
        {
            ResourceListing listing = new ResourceListing();
            listing.Apis = new Resource[] { new Resource(), new Resource() { Path = null }, new Resource() };

            listing.Validate(Violations);
            AssertInvalidProperty("Apis[1].Path", Common.Swagger.Common.ViolationLevel.Error);
        }