コード例 #1
0
        public void GetTributeByIDTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            int UserId = InsertDummyUser("tj_op");
            int tributeId = 0;
            GetMyTributes _objtribute = new GetMyTributes();
            _objtribute.UserId = UserId;
            object[] _param = { _objtribute, 0, 1, 2 };
            if (_objtribute.CustomError == null)
            {
                List<GetMyTributes> Mytributes = new List<GetMyTributes>();
                Mytributes = target.GetMyTributes(_param);
                Assert.AreEqual(true, Mytributes.Count > 0);
                tributeId = Mytributes[0].TributeId;

            }
            TributesUserInfo _objTributeUserinfo = new TributesUserInfo(); // TODO: Initialize to an appropriate value
            _objTributeUserinfo.Tributes = new Tributes();
            _objTributeUserinfo.Tributes.TributeId = tributeId;

            target.GetTributeByID(_objTributeUserinfo);
            Assert.AreEqual("tj", _objTributeUserinfo.Tributes.TributeName);
            Assert.AreEqual("xyz", _objTributeUserinfo.Tributes.TributeUrl);
            Assert.AreEqual("Birthday", _objTributeUserinfo.Tributes.TypeDescription);
            Assert.AreEqual("tj", _objTributeUserinfo.Tributes.TributeName);
            Assert.AreEqual("11-03-1983 AM 12:00:00", _objTributeUserinfo.Tributes.Date1.ToString());
            //Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }