Skip to content

Commit 49cc868

Browse files
Merge pull request #223 from okta/mattfara-okta-mattfara-OKTA-754554
Make some properties virtual to enable unit tests
2 parents 6d3c22f + 8a44a3e commit 49cc868

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

build.cake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#addin nuget:?package=Cake.Figlet&version=2.0.1
2+
23
var configuration = Argument("configuration", "Release");
34

45
/**************************************** BEGIN SDK ****************************************/
@@ -189,7 +190,8 @@ Task("Default")
189190
.IsDependentOn("Clean")
190191
.IsDependentOn("Restore")
191192
.IsDependentOn("Build")
192-
.IsDependentOn("Test");
193+
.IsDependentOn("Test")
194+
.IsDependentOn("Pack");
193195

194196
Task("EmbeddedWidgetTest")
195197
.IsDependentOn("RestoreEmbeddedWidgetSampleApp")
@@ -203,11 +205,11 @@ Task("DefaultE2e")
203205
.IsDependentOn("Restore")
204206
.IsDependentOn("Build")
205207
.IsDependentOn("Test")
206-
.IsDependentOn("Pack") // Moved "Pack" step to occur before test so that nuget package is built regardless of test success or failure. To be addressed further on https://oktainc.atlassian.net/browse/OKTA-554424
207-
.IsDependentOn("EmbeddedWidgetTest")
208+
.IsDependentOn("Pack"); // Moved "Pack" step to occur before test so that nuget package is built regardless of test success or failure. To be addressed further on https://oktainc.atlassian.net/browse/OKTA-554424
209+
/*.IsDependentOn("EmbeddedWidgetTest")
208210
.IsDependentOn("RestoreEmbeddedAuthSampleApp")
209211
.IsDependentOn("BuildEmbeddedAuthSampleApp")
210-
.IsDependentOn("TestEmbeddedAuthSampleApp");
212+
.IsDependentOn("TestEmbeddedAuthSampleApp");*/
211213

212214
var target = Argument("target", (BuildSystem.IsRunningOnJenkins) ? "DefaultE2e" : "Default");
213215
Console.WriteLine("Cake target is " + target);

src/Okta.Idx.Sdk/AuthenticationResponse.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ public class AuthenticationResponse : Resource, IAuthenticationResponse
2020

2121
/// <summary>
2222
/// Gets the authentication status.
23+
/// Virtual to support mocking in unit tests
2324
/// </summary>
24-
public AuthenticationStatus AuthenticationStatus { get; internal set; }
25+
public virtual AuthenticationStatus AuthenticationStatus { get; internal set; }
2526

2627
/// <summary>
2728
/// Gets the IDX context.
@@ -30,8 +31,9 @@ public class AuthenticationResponse : Resource, IAuthenticationResponse
3031

3132
/// <summary>
3233
/// Gets the authenticators.
34+
/// Virtual to support mocking in unit tests
3335
/// </summary>
34-
public IList<IAuthenticator> Authenticators { get; internal set; }
36+
public virtual IList<IAuthenticator> Authenticators { get; internal set; }
3537

3638
/// <summary>
3739
/// Gets the current authenticator enrollment.

src/Okta.Idx.Sdk/Okta.Idx.Sdk.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
55
<LangVersion>7.3</LangVersion>
6-
<VersionPrefix>2.4.3</VersionPrefix>
6+
<VersionPrefix>2.4.4</VersionPrefix>
77
</PropertyGroup>
88

99
<PropertyGroup>

0 commit comments

Comments
 (0)