public ProjectStatusListViewItemAdaptor(IDetailStringProvider detailStringProvider) { this.detailStringProvider = detailStringProvider; activity = new ListViewItem.ListViewSubItem(item, ""); item.SubItems.Add(activity); detail = new ListViewItem.ListViewSubItem(item, ""); item.SubItems.Add(detail); lastBuildLabel = new ListViewItem.ListViewSubItem(item, ""); item.SubItems.Add(lastBuildLabel); lastBuildTime = new ListViewItem.ListViewSubItem(item, ""); item.SubItems.Add(lastBuildTime); }
public ProjectStatusListViewItemAdaptor(IDetailStringProvider detailStringProvider) { this.detailStringProvider = detailStringProvider; serverName = new ListViewItem.ListViewSubItem(); item.SubItems.Add(serverName); category = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(category); activity = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(activity); detail = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(detail); lastBuildLabel = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(lastBuildLabel); lastBuildTime = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(lastBuildTime); projectStatus = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(projectStatus); }
public void UsesDescriptionBuilderToGenerateDetailCaption() { mockProjectDetailStringFormatter = new Mock <IDetailStringProvider>(MockBehavior.Strict); detailStringFormatter = mockProjectDetailStringFormatter.Object; StubProjectMonitor projectMonitor = new StubProjectMonitor("projectName"); mockProjectDetailStringFormatter.Setup(formatter => formatter.FormatDetailString(projectMonitor)).Returns("test1").Verifiable(); ProjectStatusListViewItemAdaptor adaptor = new ProjectStatusListViewItemAdaptor(detailStringFormatter); ListViewItem item = adaptor.Create(projectMonitor); ListViewItem.ListViewSubItem detail = item.SubItems[4]; Assert.AreEqual("test1", detail.Text); mockProjectDetailStringFormatter.Setup(formatter => formatter.FormatDetailString(projectMonitor)).Returns("test2").Verifiable(); projectMonitor.OnPolled(new MonitorPolledEventArgs(projectMonitor)); Assert.AreEqual("test2", detail.Text); mockProjectDetailStringFormatter.Verify(); }
public ProjectStatusListViewItemAdaptor(IDetailStringProvider detailStringProvider) { this.detailStringProvider = detailStringProvider; serverName = new ListViewItem.ListViewSubItem(); item.SubItems.Add(serverName); category = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(category); activity = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(activity); detail = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(detail); lastBuildLabel = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(lastBuildLabel); lastBuildTime = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(lastBuildTime); projectStatus = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(projectStatus); qName = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(qName); qPriority = new ListViewItem.ListViewSubItem(item, string.Empty); item.SubItems.Add(qPriority); }
public void SetUp() { mockProjectDetailStringFormatter = new DynamicMock(typeof (IDetailStringProvider)); detailStringFormatter = (IDetailStringProvider) mockProjectDetailStringFormatter.MockInstance; }
public ProjectStatusListViewItemAdaptor(IDetailStringProvider detailStringProvider, ICCTrayMultiConfiguration config) : this(detailStringProvider) { this.config = config; }
public void SetUp() { mockProjectDetailStringFormatter = new DynamicMock(typeof(IDetailStringProvider)); detailStringFormatter = (IDetailStringProvider)mockProjectDetailStringFormatter.MockInstance; }
public void SetUp() { mockProjectDetailStringFormatter = new Mock <IDetailStringProvider>(); detailStringFormatter = (IDetailStringProvider)mockProjectDetailStringFormatter.Object; }