public void ToODataString_DateTimeOffset() { var dt = DateTimeOffset.Parse("2021-03-01T07:30:22.000+00:00"); var expected = $"cast(2021-03-01T07:30:22.000Z,Edm.DateTimeOffset)"; var actual = EdmTypeSupport.ToODataString(dt); Assert.Equal(expected, actual); }
public void ToODataString_Guid() { var guid = Guid.NewGuid(); var expected = $"cast({guid},Edm.Guid)"; var actual = EdmTypeSupport.ToODataString(guid); Assert.Equal(expected, actual); }
public void ToODataString_Unknown() { var sut = new IdEntity { Id = "1234" }; var actual = EdmTypeSupport.ToODataString(sut); Assert.Null(actual); }