Example #1
0
        public EventDTO(Event ev)
            : base(ev)
        {
            Activity = new ActivityDTO(ev.Activity);

            //UsersInEvent = new List<EventUserDTO>();
            //GuestsInEvent = new List<EventGuestDTO>();
            //ev.UsersInEvent.ForEach(x => UsersInEvent.Add(new EventUserDTO(x)));
            //ev.GuestsInEvent.ForEach(x => GuestsInEvent.Add(new EventGuestDTO(x)));
        }
Example #2
0
        public void ActivityDTOTest()
        {
            Location location = new Location()
            {
                Name = "asdf",
                Address = "zxvc",
                LocationID = 1
            };

            Activity activity = new Activity()
            {
                ActivityID = 1,
                Name = "asdf",
                DayOfWeek = "Thursday",
                PreferredTime = new TimeSpan(1),
                Location = location
            };

            var dto = new ActivityDTO(activity);

            AssertActivityDTO(activity, dto);
        }
Example #3
0
 private void AssertActivityDTO(Activity activity, ActivityDTO dto)
 {
     AssertDTO(activity, dto, new[] { "ActivityID", "Name", "DayOfWeek", "PreferredTime" });
     AssertLocationDTO(activity.Location, new LocationDTO(activity.Location));
 }