Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
- fixes test models
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Oct 23, 2023
1 parent a386605 commit 426ad11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ public class DerivedTestEntity : TestEntity
/// Date enrolled in primary school
/// </summary>
public Date? EnrolmentDate { get; set; }
public new IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public override IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
var parentDeserializers = base.GetFieldDeserializers();
parentDeserializers.Add("enrolmentDate", n => { EnrolmentDate = n.GetDateValue(); });
return parentDeserializers;
}
public new void Serialize(ISerializationWriter writer)
public override void Serialize(ISerializationWriter writer)
{
base.Serialize(writer);
writer.WriteDateValue("enrolmentDate", EnrolmentDate.Value);
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Kiota.Serialization.Json.Tests/Mocks/TestEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public TestEntity()
/// <summary>
/// The deserialization information for the current model
/// </summary>
public IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>> {
{"id", n => { Id = n.GetStringValue(); } },
Expand All @@ -55,7 +55,7 @@ public IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
/// Serializes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer)
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("id", Id);
Expand Down

0 comments on commit 426ad11

Please sign in to comment.