protected void Page_Load(object sender, EventArgs e) { StateManager stateManager = StateManager.Instance; SessionValue objSessionvalue = (SessionValue)stateManager.Get("objSessionvalue", StateManager.State.Session); if (objSessionvalue != null) { object[] objValue ={ objSessionvalue.UserId }; UserInfoManager objinbox = new UserInfoManager(); int _inboxcount = objinbox.UserInboxCount(objValue); lbtnInbox.Text = "Inbox (" + _inboxcount.ToString() + ")"; lbtnInbox.Visible = true; } else { lbtnInbox.Visible = false; } }
public void UserInboxCountTest() { UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value int UserId = InsertDummyUser("tj_op"); object[] objValue = { UserId }; // TODO: Initialize to an appropriate value int expected = 0; // TODO: Initialize to an appropriate value int actual; actual = target.UserInboxCount(objValue); Assert.AreEqual(expected, actual); //Assert.Inconclusive("Verify the correctness of this test method."); }