Пример #1
0
        public void Setup()
        {
            //These tests are designed to run against the Cherwell Demo database
            //Make sure that your connection exists in C:\ProgramData\Trebuchet\Connections.xml
            var config = new CsmClientConfiguration("CSDAdmin", "CSDAdmin", "[common]devlocal");

            //The trebuchet dlls maintain the connection to the server.
            var factory = new CsmClientFactory(config);

            _client = factory.GetCsmClient();
        }
Пример #2
0
        public void Setup()
        {
            // These tests are designed to run against the Cherwell Demo database
            // Make sure that your connection exists in C:\ProgramData\Trebuchet\Connections.xml
            var config = new CsmClientConfiguration("CSDAdmin", "CSDAdmin", "[common]devlocal");

            // The trebuchet dlls maintain the connection to the server.
            var factory = new CsmClientFactory(config);

            _client = factory.GetCsmClient();

            // Put some meat in each of those temp files so we have some bytes to transfer
            foreach (var tmpFile in _tmpFileList)
            {
                try
                {
                    var streamWriter = tmpFile.InputAttachment.AppendText();
                    streamWriter.WriteLine(string.Format("Test Attachment: {0}", tmpFile.InputAttachment.FullName));
                    streamWriter.Flush();
                    streamWriter.Close();
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error Creating files for Read Tests");
                    Console.WriteLine(ex.StackTrace);
                }
            }
        }