Ejemplo n.º 1
0
        public void GetDashboard()
        {
            var expTimeEntry = TimeEntryService.Add(new TimeEntry()
            {
                IsBillable  = true,
                CreatedWith = "TimeEntryTestAdd",
                Description = "Test",
                Duration    = 900,
                Start       = DateTime.Now.ToIsoDateStr(),
                Stop        = DateTime.Now.AddMinutes(20).ToIsoDateStr(),
                ProjectId   = DefaultProjectId,
                WorkspaceId = DefaultWorkspaceId,
                TagNames    = new List <string> {
                    Guid.NewGuid().ToString(), Guid.NewGuid().ToString()
                }
            });

            Assert.IsNotNull(expTimeEntry);

            var currentUser = UserService.GetCurrent();

            Assert.IsNotNull(currentUser);
            Assert.IsNotNull(currentUser.DefaultWorkspaceId);

            var result = DashboardService.Get((int)currentUser.DefaultWorkspaceId);

            Assert.IsNotNull(result);
        }
 public ActionResult <DashboardInfo> Get()
 {
     return(Ok(dashboardService.Get()));
 }
Ejemplo n.º 3
0
 public ActionResult <List <DashboardItem> > Get() => _dashboardService.Get();
Ejemplo n.º 4
0
        public void ShouldGetEngagement()
        {
            var engagementId = 1;
            var importId     = 2;
            var chartSet     = "dashboard";

            _importEntity.Id = importId;
            _dashboardService.Get(chartSet, engagementId);
            _mockEngagementRepository.Verify(x => x.Get(engagementId), Times.Once);
        }