Пример #1
0
        public void Execute()
        {
            List <ResultItem> results = new StringCouldBeNumberRule(openApiContract, supressions, ruleSettings, cache).Execute();

            Assert.Equal(4, results.Count);

            Assert.Equal(@"path:/path-one,method:get,response:200,content:application/json,response.property:one",
                         results[0].Value);
            Assert.Equal(@"path:/path-one,method:get,response:200,content:application/json,response.property:two",
                         results[1].Value);
            Assert.Equal(@"path:/path-one,method:get,response:200,content:application/json,response.property:three",
                         results[2].Value);
            Assert.Equal(@"path:/path-one,method:get,response:200,content:application/json,response.property:four",
                         results[3].Value);

            Assert.True(new StringCouldBeNumberRule(openApiContract, supressionEntireRule, ruleSettings, cache).Execute().Count == 0);
        }
        public void Execute()
        {
            List <ResultItem> results = new StringCouldBeNumberRule(openApiContract, supressions, ruleSettings, cache).Execute();

            Assert.Equal(4, results.Count);

            Assert.Equal(@"Path='/path-one',Operation='get',Parameter='one'",
                         results[0].Value);
            Assert.Equal(@"Path='/path-one',Operation='get',Parameter='two'",
                         results[1].Value);
            Assert.Equal(@"Path='/path-one',Operation='get',Parameter='three'",
                         results[2].Value);
            Assert.Equal(@"Path='/path-one',Operation='get',Parameter='four'",
                         results[3].Value);

            Assert.True(new StringCouldBeNumberRule(openApiContract, supressionEntireRule, ruleSettings, cache).Execute().Count == 0);
        }