Exemplo n.º 1
0
        public void ApiDeclarationSanityNotSafe()
        {
            ApiDeclaration = new Common.Swagger12.ApiDeclaration(false);

            Assert.AreEqual("1.2", ApiDeclaration.SwaggerVersion);
            Assert.IsNull(ApiDeclaration.ApiVersion);
            Assert.IsFalse(string.IsNullOrEmpty(ApiDeclaration.BasePath));
            Assert.IsNull(ApiDeclaration.ResourcePath);
            Assert.IsNull(ApiDeclaration.Produces);
            Assert.IsNull(ApiDeclaration.Consumes);
            Assert.IsNull(ApiDeclaration.Apis);

            ApiDeclaration.Validate(Violations);
            Assert.AreEqual(0, Violations.Count);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor. 
 /// </summary>
 public ApiDeclarationTests()
 {
     ApiDeclaration = new ApiDeclaration();
 }