using System; using System.IO; using Endpoint; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Collections.Generic; namespace EndpointTest { ///// /////This is a test class for ServiceEndpointConfigurationTest and is intended /////to contain all ServiceEndpointConfigurationTest Unit Tests ///// //[TestClass()] //public class ServiceEndpointConfigurationTest //{ // private readonly Uri _uri = new Uri("http://www.google.com"); // private const string _testFilename = "testFilename.xml"; // /// // ///A test for SaveConfigurationList // /// // [TestMethod] // public void SaveAndLoadConfigurationListTest() // { // try // { // HttpEndpointConfiguration httpEndpoint = new HttpEndpointConfiguration("", _uri); // OracleEndpointConfiguration oracleEndpoint = new OracleEndpointConfiguration("", "connection", "query", "result"); // List serviceEndpointConfigurations // = new List { httpEndpoint, oracleEndpoint }; // IServiceEndpointConfiguration.SaveConfigurationList(serviceEndpointConfigurations, _testFilename); // // load the results // List loadedList = IServiceEndpointConfiguration.LoadConfigurationList(_testFilename); // // verify that they're the same // foreach (IServiceEndpointConfiguration serviceEndpointConfiguration in serviceEndpointConfigurations) // { // IServiceEndpointConfiguration tmp = serviceEndpointConfiguration; // IServiceEndpointConfiguration foundConfig // = loadedList.Find(loadedEndpointConfig => loadedEndpointConfig.Equals(tmp)); // Assert.IsNotNull(foundConfig); // } // } // finally // { // FileInfo f = new FileInfo(_testFilename); // // f.CopyTo(@"c:\test.xml"); // if (f.Exists) // f.Delete(); // } // } //} }