Ejemplo n.º 1
0
void TestComArtifacts::TestGetAt()
{
	extern bool g_bCalledArtifacts_GetItem;
	_ArtifactsPtr spArtifacts = CreateMockArtifacts(_T("mock://123/123"));  
	ComArtifacts artifacts(spArtifacts);
	Artifact bridge = artifacts.GetAt(0);
	assertTypeOf(bridge.GetImplementor(), const ComArtifact*);   
	assertMessage(g_bCalledArtifacts_GetItem, _T("Expected ComArtifacts::GetAt to call _Artifacts::get_Item"));
}
Ejemplo n.º 2
0
void TestComArtifact::TestCreateRelatedItem()
{
    extern bool g_bCalledArtifact_CreateRelatedItem;

    _ArtifactPtr spArtifact = CreateMockArtifact(L"mock://123/123");
    ComArtifact artifact(spArtifact);
    Artifact bridge = artifact.CreateRelatedItem(L"", L"", L"", false);

    assertTypeOf(bridge.GetImplementor(), const ComArtifact*);
    assertMessage(g_bCalledArtifact_CreateRelatedItem, _T("Expected MockArtifact::CreateRelatedArtifact to be called from ComArtifact::CreateRelatedArtifact"));
}