public void NativePlatformLoad(string placementId) { m_NativePlatformMock.Setup(x => x.Load(It.IsAny <string>(), It.IsAny <IUnityAdsLoadListener>())); var platform = new Platform.Platform(m_NativePlatformMock.Object, m_BannerMock.Object, m_CoroutineExecutorMock.Object); platform.Load(placementId, null); m_NativePlatformMock.Verify(x => x.Load(It.IsAny <string>(), It.IsAny <IUnityAdsLoadListener>()), Times.Once(), "NativePlatform.Load() was not called as expected"); }
public void NativePlatformLoadError(string placementId) { m_NativePlatformMock.Setup(x => x.Load(It.IsAny <string>(), It.IsAny <IUnityAdsLoadListener>())); var platform = new Platform.Platform(m_NativePlatformMock.Object, m_BannerMock.Object, m_CoroutineExecutorMock.Object); platform.Load(placementId, null); LogAssert.Expect(LogType.Error, "placementId cannot be nil or empty"); m_NativePlatformMock.Verify(x => x.Load(It.IsAny <string>(), It.IsAny <IUnityAdsLoadListener>()), Times.Never(), "NativePlatform.Load() was called when it should not have been"); }