Skip to content

Instantly share code, notes, and snippets.

@rofr
Created September 17, 2014 04:00
Show Gist options
  • Save rofr/b8d73a302d2ea08422b4 to your computer and use it in GitHub Desktop.
Save rofr/b8d73a302d2ea08422b4 to your computer and use it in GitHub Desktop.
Building a CMS with OrigoDB - snippet 5
[ExpectedException(typeof(InvalidOperationException))]
[TestMethod()]
public void RemovePage_fails_unless_page_exists()
{
var target = new CmsModel();
target.RemovePage(Guid.NewGuid());
}
[TestMethod()]
public void SmokeTest()
{
var engine = Engine.LoadOrCreate<CmsModel>("c:\\livedb\\cms");
var page = new Page(Guid.NewGuid(), DateTime.Now);
page.Contents = "Hello, world!";
var command = new PutPageCommand(page);
engine.Execute(command);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment