public void ConstructorsTest()
        {
            const string SERVER = "http://foo";
            const string PATH = "/bar/service";

            // Empty constructor
            var fp = new MockFactoryParameters();
            Assert.That(fp.ServerUrl, Is.EqualTo("https://www.googleapis.com"));
            Assert.That(fp.BasePath, Is.Null);

            // URL and Path constructor
            fp = new MockFactoryParameters(SERVER, PATH);
            Assert.That(fp.ServerUrl, Is.EqualTo(SERVER));
            Assert.That(fp.BasePath, Is.EqualTo(PATH));

            // URI constructor
            fp = new MockFactoryParameters(new Uri(SERVER + PATH));
            Assert.That(fp.ServerUrl, Is.EqualTo(SERVER));
            Assert.That(fp.BasePath, Is.EqualTo(PATH));
        }
Esempio n. 2
0
        public void ConstructorsTest()
        {
            const string SERVER = "http://foo";
            const string PATH   = "/bar/service";

            // Empty constructor
            var fp = new MockFactoryParameters();

            Assert.That(fp.ServerUrl, Is.EqualTo("https://www.googleapis.com"));
            Assert.That(fp.BasePath, Is.Null);

            // URL and Path constructor
            fp = new MockFactoryParameters(SERVER, PATH);
            Assert.That(fp.ServerUrl, Is.EqualTo(SERVER));
            Assert.That(fp.BasePath, Is.EqualTo(PATH));

            // URI constructor
            fp = new MockFactoryParameters(new Uri(SERVER + PATH));
            Assert.That(fp.ServerUrl, Is.EqualTo(SERVER));
            Assert.That(fp.BasePath, Is.EqualTo(PATH));
        }