Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for unit testing multiple extensions #434

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

chrisbednarski
Copy link
Contributor

Added a constructor that takes an array of types, so integration between multiple extensions can be tested.

Fixed an error that showed up after adding the new constructor, because passing null as the 2nd argument was ambiguous.
ambiguous-constructor

Example package file:
image

Example unit test file:
image

@@ -46,10 +57,13 @@ public string[] BuildAndQuery(Action<string[]> buildFunc, bool validate, params
"-intermediateFolder", intermediateFolder,
};

if (this.ExtensionType != null)
if (null != this.ExtensionType)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yoda comparisons aren't needed in managed code. (They're still officially style for WiX C code, however.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the tip

this.OutputFile = outputFile ?? "test.msi";
}

public Builder(string sourceFolder, Type[] extensionType , string[] bindPaths = null, string outputFile = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space before comma.

@@ -18,7 +29,7 @@ public Builder(string sourceFolder, Type extensionType = null, string[] bindPath

public string[] BindPaths { get; set; }

public Type ExtensionType { get; set; }
public Type[] ExtensionType { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this plural.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Member

@barnson barnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor tweaks.

@barnson barnson enabled auto-merge (rebase) July 23, 2023 23:33
@barnson barnson merged commit 5e9901d into wixtoolset:develop Jul 24, 2023
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2023
@chrisbednarski chrisbednarski deleted the feat/unit-tests branch August 20, 2023 00:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants