Replies: 2 comments 2 replies
-
Hard to answer without seeing code, but generally when testing something like Cake.Testing / NSubstitute is used. NSubstitute example here cake/src/Cake.Common.Tests/Fixtures/Build/GitHubActionsInfoFixture.cs Lines 19 to 26 in d454dc2 |
Beta Was this translation helpful? Give feedback.
-
@devlead Will that automatically download the Java executable if it doesn't exist on the machine? The issue I have is that in order for the SDKManager with Android to work, the JAVA_HOME environment variable has to be pointed to the folder where it was installed. But on a clean Release MS Hosted pipeline does not have android or Java installed My basic path is Is there an example of doing that? I'm looking at Cake.AndroidSDKManager and he's using an http call to grab the installation file and executing. I assumed that's what I should do or is this wrong? |
Beta Was this translation helpful? Give feedback.
-
I'm running a Unit Test for a cake extension. And i'm trying to retrieve a local environment variable, but it's not working. Do I need to just fake the variable and this will work when ran in the build pipeline?
This returns null
var home = context.Environment.GetEnvironmentVariable("JAVA_HOME");
Beta Was this translation helpful? Give feedback.
All reactions