コード例 #1
0
ファイル: InfoTests.cs プロジェクト: aidancasey/Moksy
        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
ファイル: ResourceTests.cs プロジェクト: aidancasey/Moksy
        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);
        }