Exemplo n.º 1
0
        public void ResolveToProviderIfNoWorkItem()
        {
            MockSPI        spi = new MockSPI();
            MockSPProvider sp  = new MockSPProvider(spi);
            MockWorkspace  ws  = new MockWorkspace();

            ws.Show(sp);

            Assert.AreSame(spi, ws.LastSPI);
        }
Exemplo n.º 2
0
        public void ResolveToGenericInWorkItem()
        {
            SmartPartInfo  spprovider = new SmartPartInfo("foo", "");
            SmartPartInfo  spworkitem = new SmartPartInfo("bar", "");
            MockSPProvider sp         = new MockSPProvider(spprovider);

            workItem.RegisterSmartPartInfo(sp, spworkitem);

            workspace.Show(sp);

            Assert.AreEqual("bar", workspace.LastSPI.Title);
        }
Exemplo n.º 3
0
        public void ResolveToProviderIfGenericSPIRegistered()
        {
            MockSPI        spprovider = new MockSPI();
            SmartPartInfo  spworkitem = new SmartPartInfo();
            MockSPProvider sp         = new MockSPProvider(spprovider);

            workItem.RegisterSmartPartInfo(sp, spworkitem);

            workspace.Show(sp);

            Assert.AreSame(spprovider, workspace.LastSPI);
        }
Exemplo n.º 4
0
        public void ResolveToWorkItemIfConcreteSPIRegistered()
        {
            MockSPI        spprovider = new MockSPI();
            MockSPI        spworkitem = new MockSPI();
            MockSPProvider sp         = new MockSPProvider(spprovider);

            workItem.RegisterSmartPartInfo(sp, spworkitem);

            workspace.Show(sp);

            Assert.AreSame(spworkitem, workspace.LastSPI);
        }