Exemple #1
0
        public void EmailRepository_Test_EmailInstance()
        {
            EmailRepository repo = new EmailRepository();

            Couchbase.CouchbaseClient instance = CouchbaseManager.EmailInstance;
            Assert.IsInstanceOfType(instance, typeof(Couchbase.CouchbaseClient));
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Couchbase.CouchbaseClient cb = new Couchbase.CouchbaseClient();

            Classes.Resume temp = new Classes.Resume();

            temp.Name ="Smuggo Smuggins";
            temp.Statement =" Since Failheap has an eve dieded thread, EveO could do with a failheap dieded thread.So, is it down for anyone else? Where is it? When's it back? What am I going to do with myself all afternoon?/nervous breakdown";
            temp.PhotoUrl = "http://image.eveonline.com/Character/1343751208_256.jpg";

            for(int i = rando.Next(1,3); i > 0; i--){
                Classes.Achievement a = new Classes.Achievement();
                a.Info = getranod() + " " + getranod();
                temp.Achievements.Add(a);
            }

            for (int i = rando.Next(1, 3); i > 0; i--)
            {
                string a =getranod();
                temp.Address.Add(new Address(a));
            }
            for (int i = rando.Next(1, 5); i > 0; i--)
            {
                Classes.Certification c = new Classes.Certification();
                c.Institution = getranod();
                c.Name = getranod();
                c.Url = "http://"+getranod();
                c.Year = rando.Next(1990,DateTime.Now.Year);
                temp.Certifications.Add(c);
            }

            for (int i = rando.Next(1, 5); i > 0; i--)
            {

                Classes.Education c = new Classes.Education();
                c.Institution = getranod();
                c.Degree = getranod();
                c.Url = "http://" + getranod();
                c.Year = rando.Next(1940, DateTime.Now.Year);
                temp.Education.Add(c);
            }
            for (int i = rando.Next(1, 3); i > 0; i--)
            {
                string a =getranod()+"@"+getranod()+"."+getranod();
                temp.Emails.Add(new Email(a));
            }
            for (int i = rando.Next(1, 3); i > 0; i--)
            {
                PhoneNumber p = new PhoneNumber();
                p.Number = rando.Next(0,9999999).ToString();
                p.Type = getranod();

                temp.Phones.Add(p);
            }
            for (int i = rando.Next(1, 5); i > 0; i--)
            {

                Classes.Praise c = new Classes.Praise();
                c.Statement = getranod()+ " "+ getranod()+ " "+ getranod();
                c.Name = getranod();
                c.Url = "http://" + getranod();

                temp.Praise.Add(c);
            }
            for (int i = rando.Next(1, 5); i > 0; i--)
            {

                Classes.Skill c = new Classes.Skill();

                c.Name = getranod();
                c.Url = "http://" + getranod();

                temp.Skills.Add(c);
            }
            for (int i = rando.Next(1, 5); i > 0; i--)
            {

                Classes.SocialMedia c = new Classes.SocialMedia();
                c.Service = getranod();
                c.Username = getranod();
                c.Url = "http://" + getranod();
                temp.SocialMedia.Add(c);
            }
            for (int i = rando.Next(1, 5); i > 0; i--)
            {

                Classes.Experience c = new Classes.Experience();
                c.Title = getranod() + " of "+ getranod();
                c.Start = new DateTime( rando.Next(1980,2012),rando.Next(1,12), rando.Next(1,28));
                c.End = new DateTime( rando.Next(1980,2012),rando.Next(1,12), rando.Next(1,28));
                    string detail = "";
                    for (int k = rando.Next(5, 20); k > 0; k--)
                    {
                        detail += getranod() + " ";
                    }

                c.Company = getranod();
                c.Url = "http://" + getranod();
                temp.WorkExperience.Add(c);
            }

            bool okay = cb.Store(Enyim.Caching.Memcached.StoreMode.Set, temp.Id, temp.toJSON());

            var test  = cb.Get(temp.Id);

            form1.InnerHtml = test.ToString();
        }