Skip to content

Commit 71dd535

Browse files
committed
Add MockCreateCalled flag to Login object for tracking creation calls
1 parent 049bb5d commit 71dd535

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/Unit/Stubs/SMO.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ public class Login
357357

358358
public string Name;
359359
public LoginType LoginType = LoginType.Unknown;
360+
public bool MockCreateCalled = false;
360361
public bool MustChangePassword = false;
361362
public bool PasswordPolicyEnforced = false;
362363
public bool PasswordExpirationEnabled = false;
@@ -433,6 +434,8 @@ public void Create()
433434
if( this.LoginType == LoginType.SqlLogin && _mockPasswordPassed != true ) {
434435
throw new System.Exception( "Called Create() method for the LoginType 'SqlLogin' but called with the wrong overloaded method. Did not pass the password with the Create() method." );
435436
}
437+
438+
this.MockCreateCalled = true;
436439
}
437440

438441
public void Create( SecureString secureString )

0 commit comments

Comments
 (0)