예제 #1
0
        public async Task <IActionResult> Details(string id)
        {
            RecordDetailsViewModel recordDetails = (await
                                                    this.recordService.GetById(id)).To <RecordDetailsViewModel>();

            return(View(recordDetails));
        }
        public RecordDetailsViewModelTests()
        {
            this.messenger = new TestMessenger();

            Messenger.OverrideDefault(this.messenger);

            this.viewModel = new RecordDetailsViewModel();
        }
        public RecordDetailsViewModelTests()
        {
            this.messenger = new TestMessenger();

            Messenger.OverrideDefault(this.messenger);

            this.viewModel = new RecordDetailsViewModel();
        }
        public void Initialize()
        {
            string description = "this is my activity";

            mockActivity.ActivityTimes = new System.Collections.ObjectModel.ObservableCollection <ActivityTime>();
            mockActivity.ActivityTimes.Add(new ActivityTime {
                StartTime = new DateTime(2015, 9, 25, 12, 0, 0), EndTime = new DateTime(2015, 9, 25, 13, 29, 0)
            });
            mockActivity.ActivityTimes.Add(new ActivityTime {
                StartTime = new DateTime(2015, 9, 25, 14, 0, 0), EndTime = new DateTime(2015, 9, 25, 15, 0, 0)
            });
            mockActivity.Description = description;
            viewModel = new RecordDetailsViewModel(mockActivity);
        }