Guest User

Untitled

a guest
Aug 3rd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. [TestFixture]
  2. public class ImpersonationTestFixture
  3. {
  4. [Test]
  5. [Impersonate(UserName = "Cavey", Password = "l@ff@lympix", Domain = "ScoobyDoobies")]
  6. [Impersonate(UserName = "Shaggy", Password = "p1zz@", Domain = "ScoobyDoobies")]
  7. [Impersonate(UserName = "FredFlintstone", Password = "br0nt0", Domain = "ScoobyDoobies")]
  8. public void ImpersonationTest()
  9. {
  10. // We just write the name of the current user in the test log.
  11. TestLog.WriteLine(WindowsIdentity.GetCurrent().Name);
  12. }
  13. }
Add Comment
Please, Sign In to add comment