void ExpectFindThirdFont() { DWriteResource->FindFontFaceMethod.SetExpectedCalls(1, [&](IDWriteFontFace* fontFace, UINT32* index, BOOL* exists) { Assert::IsTrue(IsSameInstance(RealizedDWriteFontFace.Get(), fontFace)); *index = 2; *exists = TRUE; return S_OK; }); }
void ExpectSetDeviceWithNullAndThen(ComPtr<IUnknown> expected) { SurfaceImageSource->SetDeviceMethod.SetExpectedCalls(2, [=] (IUnknown* actualDevice) { if (this->SurfaceImageSource->SetDeviceMethod.GetCurrentCallCount() == 1) { Assert::IsNull(actualDevice); } else { Assert::IsTrue(IsSameInstance(actualDevice, expected.Get())); } return S_OK; }); }