public InstallerRegression() { _locationInstalFile = NunitSettings.InstallFileLocation; _dttPath = NunitSettings.DttPath; _major = Environment.OSVersion.Version.Major; using (var systemSettings = new SystemSettings()) { //Set pro systemSettings.projectPath = NunitSettings.ProjectPath; //Set value packet-duration = 20 systemSettings.packetDuration = 1800; //data-transfer-settings poll-period = ‘20’ systemSettings.dttPollPeriod = 20; } _win7LocationData = DttRegression.PathToPacket; _winXpAnd2003LocationData = DttRegression.PathToPacket; _environmentVariable = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE"); Debug.Assert(_environmentVariable != null, "_environmentVariable != null"); if (_environmentVariable != null | _major != 5 | _environmentVariable.Contains("64")) { _msiValid = AT.DirectoryExists(@"C:\Program Files (x86)\MsiVal2") ? @"C:\Program Files (x86)\MsiVal2" : @"C:\Program Files\MsiVal2"; } else { _msiValid = @"C:\Program Files\MsiVal2"; } }
public void InstallerNo3RdpartDependencies() { Console.WriteLine("Install AT"); BehaviorsRegression.CleanMachine(); AT.Install(); Console.WriteLine("Check services"); CheckProcessAndServicesStarted(); Assert.IsTrue(AT.OpenSpanDriverServiceExists(), "OpenSpanDriverService isn't started."); Assert.IsTrue(AT.OpenSpanServiceExists(), "OpenSpanService isn't started."); Console.WriteLine("Check folders"); AT.DirectoryExists(_dttPath); //Identify win7 or winXp Assert.IsTrue(_major != 5 ? AT.DirectoryExists(_win7LocationData) : AT.DirectoryExists(_winXpAnd2003LocationData)); Console.WriteLine("Uninstall"); AT.UninstallAt(_locationInstalFile); }
public void TestInstallerCleanUninstall() { Console.WriteLine("Install AT"); BehaviorsRegression.CleanMachine(); SetPacketDurationAT(5); AT.Install(); Console.WriteLine("Check services"); CheckProcessAndServicesStarted(); Console.WriteLine("Check folders"); Thread.Sleep(DelayInstall + 10000); Assert.IsTrue(AT.DirectoryExists(_dttPath)); //Identify win7 or winXp Assert.IsTrue(_major != 5 ? AT.DirectoryExists(_win7LocationData) : AT.DirectoryExists(_winXpAnd2003LocationData), "Folder isn't created properly."); Console.WriteLine("Uninstall check services and folders"); AT.UninstallAt(_locationInstalFile); CheckProcessAndServicesAbsent(); Assert.IsFalse(AT.DirectoryExists(DttRegression.PathToPacket), "Folder isn't removed properly."); }