/// <summary>Sets up the default connection string for the Northwind EDM model.</summary> private static void SetupNorthwindModelDatabase() { AstoriaDatabase database = new AstoriaDatabase("Northwind"); NorthwindModel.NorthwindContext.ContextConnectionString = DataUtil.BuildEntityConnection( TestUtil.NorthwindMetadataDirectory, "Northwind", database.DatabaseConnectionString); TestWebRequest.SerializedTestArguments["NorthwindContextConnectionString"] = NorthwindModel.NorthwindContext.ContextConnectionString; AstoriaUnitTests.Stubs.Sql.SqlNorthwindDataContext.DefaultConnectionString = database.DatabaseConnectionString; }
private AstoriaCustomServiceHost(Workspace workspace, string webDataServicePrefixName, AstoriaDatabase database) : base(workspace, webDataServicePrefixName, database) { }
public AstoriaServiceHost(Workspace workspace, string webDataServicePrefixName, string machineName, AstoriaDatabase database) : base(workspace, webDataServicePrefixName, machineName, database) { if (AstoriaTestProperties.Host == Host.IDSH || AstoriaTestProperties.Host == Host.IDSH2) { if (AstoriaTestProperties.HostAuthenicationMethod != "None") { AstoriaTestLog.FailAndThrow("Test implementations of IDSH do not support authentication"); } } waitHandleName = waitHandlePrefix + identifier; serviceInstanceName = this.WebDataServicePrefixName + "_" + identifier; exeName = serviceName + this.WebDataServicePrefixName; if (ProcessHelper.IsLocalMachine(this.MachineName)) { DestinationFolder = Path.Combine(serviceHostFolder, serviceInstanceName); DestinationFolder_Local = DestinationFolder; ExecutablePath = Path.Combine(DestinationFolder, exeName + ".exe"); localExecutablePath = ExecutablePath; } else { string remoteMachineLocalPath = IISHelper.GetLocalMachineWWWRootSharePath(this.MachineName); DestinationFolder_Local = Path.Combine(IISHelper.GetLocalMachineWWWRootSharePath(this.MachineName), serviceInstanceName); DestinationFolder = Path.Combine(IISHelper.GetWWWRootSharePath(this.MachineName), serviceInstanceName); ExecutablePath = Path.Combine(DestinationFolder, exeName + ".exe"); localExecutablePath = Path.Combine(DestinationFolder_Local, exeName + ".exe"); } rootUri = Uri.UriSchemeHttp + "://" + this.MachineName + ":7777"; }