コード例 #1
0
        public void GivenValidJson_WhenCreatingJsonArrayRequest_ThenCreatesObject()
        {
            var request = JsonRequest.Create("[ \"a\", \"b\"]", new Dictionary <string, string>());

            var properties = request.GetProperties();

            string[] expected = { "0", "1" };

            Assert.That(properties, Is.EquivalentTo(expected));
        }
コード例 #2
0
 public void GivenInValidJson_WhenCreatingJsonArrayRequest_ThenThrowsException()
 {
     Assert.Throws <ArgumentException>(() => JsonRequest.Create("a", new Dictionary <string, string>()));
 }