public void Should_create_value_from_instant_object() { var instant = Instant.FromUnixTimeSeconds(4123125455); Assert.Equal(instant.ToString(), JsonValue.Create((object)instant).ToString()); }
public void Should_throw_exception_if_creation_value_from_invalid_type() { Assert.Throws <ArgumentException>(() => JsonValue.Create(default(TimeSpan))); }
public void Should_cache_zero() { Assert.Same(JsonValue.Zero, JsonValue.Create(0)); }
public void Should_create_boolean_from_object() { Assert.Equal(JsonValue.True, JsonValue.Create((object)true)); }
public void Should_cache_empty() { Assert.Same(JsonValue.Empty, JsonValue.Create(string.Empty)); }
public void Should_cache_false() { Assert.Same(JsonValue.False, JsonValue.Create(false)); }
public void Should_cache_true() { Assert.Same(JsonValue.True, JsonValue.Create(true)); }
public JsonObject Add(string key, object?value) { return(Add(key, JsonValue.Create(value))); }
public void Should_throw_exception_when_creation_value_from_invalid_type() { Assert.Throws <ArgumentException>(() => JsonValue.Create(Guid.Empty)); }