Exemplo n.º 1
0
 public void CheckinCreate()
 {
     MockUserResource userResource = new MockUserResource();
     IUserService userService = new UserService(userResource);
     userService.CheckinCreate(1, 1);
     Assert.AreEqual(userResource.CheckedInUserID, 1);
 }
Exemplo n.º 2
0
        public bool Checkin(string userid, string businessid)
        {
            try
            {

                UserService userService = new UserService();
                Logging.WriteToFileLog("Status : " + (int)UserOnlineStatus.Online);
                userService.UserOnlineStatusUpdate(userid, ((int)UserOnlineStatus.Online).ToString());
                return userService.CheckinCreate(int.Parse(userid), int.Parse(businessid));
            }
            catch (Exception e)
            {
                Logging.WriteToEventLog("USER Checkin " + e.Message);
                return false;
            }
        }
Exemplo n.º 3
0
        static void CreateUser(bool male, string url, string loc, int busid, int count)
        {
            int age = 30 + count;
            Incyte.GenderType gend = Incyte.GenderType.FEMALE;
            if(male)
                gend = Incyte.GenderType.MALE;

            UserService uss = new UserService();
            UserLogin ul = uss.LoginCreate(new UserLogin() { ExternalID = "EX" + count.ToString(), UserSourceType = Incyte.SourceType.Facebook });
            Console.WriteLine("USERID = " + ul.UserID + " ISNEW = " + ul.IsNew.ToString());
            UserInfo uf = uss.UserInfoCreate(new UserInfo() { UserID = ul.UserID,
                Age = short.Parse(age.ToString()),
                Gender = gend, OnlineStatusID = 1,
                PictureLocation = url + "/pic" + ul.UserID.ToString() + ".Jpeg",
                Preference = (gend == Incyte.GenderType.MALE? Incyte.PreferenceType.FEMALE:Incyte.PreferenceType.MALE),
                 EmailAddress = "testemail" + ul.UserID.ToString() + "@mynglz.com",
                Handle = "Handle " + ul.UserID + " ISNEW : " + ul.IsNew.ToString(),
            InstantTitle = "Title " + ul.UserID.ToString()
               });

            if (System.IO.File.Exists(loc + @"\pic" + ul.UserID.ToString() + ".Jpeg"))
                System.IO.File.Delete(loc + @"\pic" + ul.UserID.ToString() + ".Jpeg");

            Bitmap bmp = CreateBitmapImage("USER ID " + ul.UserID.ToString() + " : " + gend.ToString());
            bmp.Save(loc + @"\pic" + ul.UserID.ToString() + ".Jpeg", System.Drawing.Imaging.ImageFormat.Jpeg);
            uss.CheckinCreate(uf.UserID, busid);
        }
Exemplo n.º 4
0
 public void CheckinCreateDB()
 {
     IUserService userService = new UserService();
     userService.CheckinCreate(1, 1);
     userService.CheckinCreate(2, 2);
 }