コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
        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;
 }
コード例 #8
0
 public void SetUp()
 {
     mockProjectDetailStringFormatter = new DynamicMock(typeof(IDetailStringProvider));
     detailStringFormatter            = (IDetailStringProvider)mockProjectDetailStringFormatter.MockInstance;
 }
コード例 #9
0
 public void SetUp()
 {
     mockProjectDetailStringFormatter = new Mock <IDetailStringProvider>();
     detailStringFormatter            = (IDetailStringProvider)mockProjectDetailStringFormatter.Object;
 }
コード例 #10
0
 public ProjectStatusListViewItemAdaptor(IDetailStringProvider detailStringProvider, ICCTrayMultiConfiguration config)
     : this(detailStringProvider)
 {
     this.config = config;
 }