Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tests for variants entries #58

Merged
merged 6 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Contentstack.Core.Tests/EntryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ await sourceEntry
else
{
Assert.True(result.Uid == sourceEntry.Uid);
Assert.NotNull(result._variant);
Assert.NotNull(result._variant["_uid"]);
}
});
}
Expand All @@ -120,6 +122,8 @@ await sourceEntry
else
{
Assert.True(result.Uid == sourceEntry.Uid);
Assert.NotNull(result._variant);
Assert.NotNull(result._variant["_uid"]);
}
});
}
Expand Down
18 changes: 17 additions & 1 deletion Contentstack.Core/Models/Entry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private string _Url

internal Dictionary<string, object> _metadata = new Dictionary<string, object>();
#endregion


#region Public Properties
/// <summary>
/// Title of an entry
Expand Down Expand Up @@ -110,6 +110,22 @@ private string _Url
/// </example>
public Dictionary<string, object> Metadata { get; set; }

/// <summary>
/// Set key/value attributes of an current entry instance.
/// </summary>
/// <example>
/// <code>
/// ContentstackClient stack = new ContentstackClinet(&quot;api_key&quot;, &quot;delivery_token&quot;, &quot;environment&quot;);
/// Entry entry = stack.ContentType(&quot;contentType_id&quot;).Entry(&quot;entry_uid&quot;);
/// entry.Fetch&lt;Product&gt;().ContinueWith((entryResult) =&gt; {
/// //Your callback code.
/// //var result = entryResult.Result.Object;
/// });
/// </code>
/// </example>
public Dictionary<string, object> _variant { get; set; }


/// <summary>
/// Set key/value attributes of an current entry instance.
/// </summary>
Expand Down
Loading