Example #1
0
        public void can_add_new_place()
        {
            var p = new Place {Id = 1};
            var l = new List();
            l.AddPlace(p);

            Assert.AreEqual(1, l.Places.Count);
        }
Example #2
0
        public void cannot_add_duplicate_places()
        {
            var p = new Place { Id = 1 };
            var l = new List();
            l.AddPlace(p);
            l.AddPlace(p);

            Assert.AreEqual(1, l.Places.Count);
        }
Example #3
0
        // GET /api/values
        public User Get()
        {
            var user = DocumentSession.Load<User>(2);
            var list = new List();
            list.User = "******";

               var p = new Place
            {
                Description =
                    "Kinda trendy place - multiple rooms, decent beer from Leeds brewary and guests",
                Latitude = 52.002324f,
                Longitude = -0.5734f,
                Name = "The Adelphi"

            };

            DocumentSession.Store(p);
            DocumentSession.SaveChanges();
            list.AddPlace(p);
            DocumentSession.Store(list);
            DocumentSession.SaveChanges();

            return user;
        }
Example #4
0
 public void add_list_with_unique_name_for_this_user_addsAList()
 {
     var u = new User();
     var list = new List { Name = "My new list" };
 }
Example #5
0
 public List()
 {
     Places = new List<string>();
     NumberOfPlaces = 0;
 }
Example #6
0
 public void list_inherits_from_entity()
 {
     var l = new List();
     Assert.IsTrue(l is Entity);
 }