public static void ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext context) { PtfTestClassBase.Initialize(context); // The time out length is 2000 milliseconds. timeout = TimeSpan.FromMilliseconds(2000); }
public static void ClassCleanup() { if (null != smbClientStack) { smbClientStack.Dispose(); smbClientStack = null; } PtfTestClassBase.Cleanup(); }
public static void ClassCleanup() { PtfTestClassBase.Cleanup(); string domainNC = "DC=" + LsadManagedAdapter.Instance(BaseTestSite).PrimaryDomainDnsName.Replace(".", ",DC="); string parentDN = string.Format("CN=Users,{0}", domainNC); string userDN = string.Format("CN={0},CN=Users,{1}", LsadManagedAdapter.DomainUserName, domainNC); if (Utilities.IsObjectExist(userDN, LsadManagedAdapter.Instance(BaseTestSite).PDCNetbiosName, LsadManagedAdapter.Instance(BaseTestSite).ADDSPortNum)) { Utilities.RemoveUser(LsadManagedAdapter.Instance(BaseTestSite).PDCNetbiosName, LsadManagedAdapter.Instance(BaseTestSite).ADDSPortNum, parentDN, LsadManagedAdapter.DomainUserName); } }
public static void ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext context) { PtfTestClassBase.Initialize(context); string userPassword = LsadManagedAdapter.Instance(BaseTestSite).DomainUserPassword; string newUserName = LsadManagedAdapter.DomainUserName; string domainNC = "DC=" + LsadManagedAdapter.Instance(BaseTestSite).PrimaryDomainDnsName.Replace(".", ",DC="); string parentDN = string.Format("CN=Users,{0}", domainNC); string userDN = string.Format("CN={0},CN=Users,{1}", newUserName, domainNC); if (Utilities.IsObjectExist(userDN, LsadManagedAdapter.Instance(BaseTestSite).PDCNetbiosName, LsadManagedAdapter.Instance(BaseTestSite).ADDSPortNum)) { Utilities.RemoveUser(LsadManagedAdapter.Instance(BaseTestSite).PDCNetbiosName, LsadManagedAdapter.Instance(BaseTestSite).ADDSPortNum, parentDN, newUserName); } Utilities.NewUser(LsadManagedAdapter.Instance(BaseTestSite).PDCNetbiosName, LsadManagedAdapter.Instance(BaseTestSite).ADDSPortNum, parentDN, newUserName, userPassword); }
public static void ClassCleanup() { PtfTestClassBase.Cleanup(); }
public static void ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext context) { PtfTestClassBase.Initialize(context); }
public static void ClassInitialize(TestContext context) { PtfTestClassBase.Initialize(context); }
public static void ClassInitialize(TestContext testContext) { PtfTestClassBase.Initialize(testContext, "TestPtfTestClassBase"); }