public void TODO_strict(bool allow, string path) { if (allow) { SigoAssert.Equal("v", Sigo.Create(3, path, "v").Get(path).Data); } else { SigoAssert.ThrowsAny <Exception>(() => Sigo.Create(3, path, "v")); } }
public void Throws_if_null_empty_or_has_slash() { // TODO this behaviour take some cpu cost. Add UnsafeGet1()? var sigos = new List <ISigo> { Sigo.From("v"), Sigo.Create(0), Sigo.Create(1), Sigo.Create(0).Set1("k", Sigo.From("v")), Sigo.Create(1).Set1("k", Sigo.From("v")) }; foreach (var sigo in sigos) { SigoAssert.ThrowsAny <Exception>(() => sigo.Get1(null)); SigoAssert.ThrowsAny <Exception>(() => sigo.Get1("")); SigoAssert.ThrowsAny <Exception>(() => sigo.Get1("/")); SigoAssert.ThrowsAny <Exception>(() => sigo.Get1("x/")); } }