public void NotExistPropShouldFail() { var val = CommonMacros.Iif(SdmapCompilerContext.CreateEmpty(), "", new { A = new bool?() }, new object[] { "B", "true", "false" }); Assert.False(val.IsSuccess); }
public void EmptyNullShouldTreatFalsy() { var val = CommonMacros.Iif(SdmapCompilerContext.CreateEmpty(), "", new { A = new bool?() }, new object[] { "A", "true", "false" }); Assert.True(val.IsSuccess); Assert.Equal("false", val.Value); }
public void Smoke() { var val = CommonMacros.Iif(SdmapCompilerContext.CreateEmpty(), "", new { A = true }, new object[] { "A", "true", "false" }); Assert.True(val.IsSuccess); Assert.Equal("true", val.Value); }