public void isFavoriteTestReturnsFalse() { CswNbtNode TestNode = TestData.Nodes.createControlZoneNode(); Int32 UserId = 1; Assert.IsFalse(TestNode.isFavorite(UserId)); }
public void isFavoriteTestReturnsTrue() { CswNbtNode TestNode = TestData.Nodes.createControlZoneNode(); Int32 UserId = 1; CswTableUpdate FavoritesUpdate = TestData.CswNbtResources.makeCswTableUpdate("favoritesUpdate", "favorites"); DataTable FavoritesTable = FavoritesUpdate.getEmptyTable(); DataRow FavoritesRow = FavoritesTable.NewRow(); FavoritesRow["userid"] = UserId; FavoritesRow["itemid"] = TestNode.NodeId.PrimaryKey; FavoritesTable.Rows.Add(FavoritesRow); FavoritesUpdate.update(FavoritesTable); Assert.IsTrue(TestNode.isFavorite(UserId)); }