Exemple #1
0
        public void SanityNotSafe()
        {
            Resource = new Common.Swagger12.Resource(false);

            Assert.IsNotNull(Resource.Path);
            Assert.AreNotEqual("", Resource.Path);

            Assert.IsNull(Resource.Description);

            Resource.Validate(Violations);
            Assert.AreEqual(0, Violations.Count);
        }
Exemple #2
0
        /// <summary>
        /// Constructor. 
        /// </summary>
        /// <param name="safe">If true, a safe object (with no none-null values) is created. </param>
        public ResourceListing(bool safe)
        {
            SwaggerVersion = "1.2";
            Apis = new Resource[0];

            if (safe)
            {
                ApiVersion = "";
                Info = new Info();
            }
            else
            {
            }
        }
Exemple #3
0
 public ResourceTests()
 {
     Resource = new Resource();
 }