public async Task TestAssetSynchronization() { var code = @"class Test { void Method() { } }"; using var workspace = TestWorkspace.CreateCSharp(code); var solution = workspace.CurrentSolution; // build checksum await solution.State.GetChecksumAsync(CancellationToken.None); var map = await solution.GetAssetMapAsync(CancellationToken.None); using var remoteWorkspace = CreateRemoteWorkspace(); var sessionId = 0; var storage = new SolutionAssetCache(); var assetSource = new SimpleAssetSource(workspace.Services.GetService <ISerializerService>(), map); var service = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.Services.GetService <ISerializerService>()); await service.SynchronizeAssetsAsync(new HashSet <Checksum>(map.Keys), CancellationToken.None); foreach (var kv in map) { Assert.True(storage.TryGetAsset <object>(kv.Key, out _)); } }