Created
March 4, 2019 20:46
-
-
Save jacobpedd/005801a31cc3cff539f16176a21f2dca to your computer and use it in GitHub Desktop.
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
public void BookmarksEngine_InsertBookmarkWithNoUser() | |
{ | |
SeedBookmarks(); | |
Bookmark numberOne = new Bookmark(); | |
numberOne.Topic = 7; | |
numberOne.ID = 3; | |
_bookmarksEngine.InsertBookmark(numberOne); | |
var result = _bookmarksEngine.GetBookmark(3); | |
Assert.AreEqual(3, result.ID); | |
Assert.AreEqual(0, result.User); | |
Assert.AreNotEqual(5, result.Topic); | |
} | |
[TestMethod] | |
public void BookmarksEngine_InsertBookmarkDuplicateId() | |
{ | |
SeedBookmarks(); | |
Bookmark numberOne = new Bookmark(); | |
numberOne.Topic = 7; | |
numberOne.User = 9; | |
numberOne.ID = 1; | |
_bookmarksEngine.InsertBookmark(numberOne); | |
var result = _bookmarksEngine.GetBookmark(1); | |
Assert.AreEqual(1, result.ID); | |
Assert.AreNotEqual(9, result.User); | |
Assert.AreNotEqual(8, result.Topic); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment