提交 7f9a8e08 编写于 作者: S Sam Harwell

Updates based on code review feedback

上级 019750af
......@@ -33,7 +33,7 @@ public override OptionSet WithChangedOption(OptionKey optionAndLanguage, object
return new TestOptionSet(_values.SetItem(optionAndLanguage, value));
}
internal virtual IEnumerable<OptionKey> GetChangedOptions(OptionSet optionSet)
public virtual IEnumerable<OptionKey> GetChangedOptions(OptionSet optionSet)
{
foreach (var kvp in _values)
{
......@@ -44,10 +44,5 @@ internal virtual IEnumerable<OptionKey> GetChangedOptions(OptionSet optionSet)
}
}
}
IEnumerable<OptionKey> IInternalOptionSet.GetChangedOptions(OptionSet optionSet)
{
return GetChangedOptions(optionSet);
}
}
}
......@@ -110,9 +110,8 @@ public async Task TestCreationWithOption()
Assert.Equal(solutionChecksum, await synched.State.GetChecksumAsync(CancellationToken.None));
var internalOptions = options as IInternalOptionSet;
Assert.NotNull(internalOptions);
Assert.Empty(internalOptions.GetChangedOptions(synched.Workspace.Options));
Assert.IsAssignableFrom<IInternalOptionSet>(options);
Assert.Empty(((IInternalOptionSet)options).GetChangedOptions(synched.Workspace.Options));
Assert.True(options.GetOption(RemoteHostOptions.RemoteHostTest));
Assert.True(synched.Workspace.Options.GetOption(RemoteHostOptions.RemoteHostTest));
......
......@@ -637,9 +637,8 @@ private static async Task VerifyOptionSetsAsync(Workspace workspace, string lang
Assert.Equal(asset.Checksum, assetFromStorage.Checksum);
// option should be exactly same
var internalRecovered = recovered as IInternalOptionSet;
Assert.NotNull(internalRecovered);
Assert.Equal(0, internalRecovered.GetChangedOptions(workspace.Options).Count());
Assert.IsAssignableFrom<IInternalOptionSet>(recovered);
Assert.Equal(0, ((IInternalOptionSet)recovered).GetChangedOptions(workspace.Options).Count());
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册