Created
January 22, 2018 19:59
-
-
Save hermanussen/f1c6ae921687ae2551131e6263d34ad2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestCase] | |
public void TestCombined() | |
{ | |
using (Db db = new Db() | |
{ | |
new DsDbTemplate( | |
"/sitecore/templates/Sample/Sample Item"), | |
new DsDbItem("/sitecore/content/home", true) | |
{ | |
new DbItem("Child") | |
{ | |
{"Some field", "Some field value"} | |
} | |
} | |
}) | |
{ | |
// Assert data that was deserialized from the filesystem | |
Item home = db.Database.GetItem("/sitecore/content/home"); | |
Assert.IsNotNull(home); | |
Assert.AreEqual("Hello!", home["Title"]); | |
// Assert data that was added using the regular approach | |
Item child = home.Children["Child"]; | |
Assert.IsNotNull(child); | |
Assert.AreEqual("Some field value", child["Some field"]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment