Skip to content

Commit

Permalink
Improve test to make sure the extensions are actually loaded for Cust…
Browse files Browse the repository at this point in the history
…omOptions
  • Loading branch information
ObsidianMinor committed Nov 24, 2019
1 parent 2b0b838 commit cd11d54
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -198,6 +198,10 @@ public void NoOptions()
public void MultipleImportOfSameFileWithExtension()
{
var descriptor = ExtensionsCReflection.Descriptor;
var foo = Foo.Descriptor;
var bar = Bar.Descriptor;
AssertOption("bar", foo.CustomOptions.TryGetString, ExtensionsAExtensions.Opt, foo.GetOption);
AssertOption("foo", bar.CustomOptions.TryGetString, ExtensionsAExtensions.Opt, bar.GetOption);
}

private void AssertOption<T, D>(T expected, OptionFetcher<T> fetcher, Extension<D, T> extension, Func<Extension<D, T>, T> descriptorOptionFetcher) where D : IExtendableMessage<D>
Expand Down

0 comments on commit cd11d54

Please sign in to comment.