public void SyncToDatabaseTest_仓储不存在() { IServiceProvider rootProvider = GetServiceProvider(); EntityInfoHandlerProtected handler = new EntityInfoHandlerProtected(rootProvider); IServiceProvider scopedProvider = Substitute.For <IServiceProvider>(); List <EntityInfo> entityInfos = new List <EntityInfo>(); handler.ExposedSyncToDatabase(scopedProvider, entityInfos); }
public void SyncToDatabaseTest_签名相同() { IServiceProvider rootProvider = GetServiceProvider(); EntityInfoHandlerProtected handler = new EntityInfoHandlerProtected(rootProvider); IServiceProvider scopedProvider = Substitute.For <IServiceProvider>(); IRepository <EntityInfo, Guid> repository = Substitute.For <IRepository <EntityInfo, Guid> >(); scopedProvider.GetService <IRepository <EntityInfo, Guid> >().Returns(repository); List <EntityInfo> entityInfos = Substitute.For <List <EntityInfo> >(); //entityInfos.CheckSyncByHash(scopedProvider, _logger).Returns(false); handler.ExposedSyncToDatabase(scopedProvider, entityInfos); }