Exemple #1
0
        public CheckJsonGrammar(JsonComparisonFixture fixture, string path, string key)
        {
            _fixture = fixture;
            _path    = path;
            _key     = key;

            _format = $"{path} should be {{{key}}}";
        }
            public void Store(JsonComparisonFixture fixture, StepValues values, JToken element)
            {
                var token = element.SelectToken(_path);

                if (token == null)
                {
                    values.Store(_key, null);
                }
                else
                {
                    var value = fixture.deserialize <T>(token);
                    values.Store(_key, value);
                }
            }
 public JsonValueChecks(string path, string title, JsonComparisonFixture parent)
 {
     _path   = path;
     _title  = title;
     _parent = parent;
 }
Exemple #4
0
 public JsonValueCheckExpression(string path, JsonComparisonFixture parent)
 {
     _path   = path;
     _parent = parent;
 }