Created
September 17, 2014 04:00
-
-
Save rofr/b8d73a302d2ea08422b4 to your computer and use it in GitHub Desktop.
Building a CMS with OrigoDB - snippet 5
This file contains hidden or 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
[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