Exemple #1
0
        public void Properties()
        {
            /* simulate what should happen with the following <provider> line:
             * <provider name="FooProvider" description="Provider for foos" />
             */

            NameValueCollection extra_attrs = new NameValueCollection();

            extra_attrs.Add("description", "Provider for foos");

            TestProviderBase test = new TestProviderBase();

            test.Initialize("FooProvider", extra_attrs);

            Assert.AreEqual("FooProvider", test.Name, "A1");
            Assert.AreEqual("Provider for foos", test.Description, "A2");

            /* simulate what should happen with the following <provider> line:
             * <provider name="FooProvider" /> */

            extra_attrs = new NameValueCollection();
            test        = new TestProviderBase();

            test.Initialize("FooProvider", extra_attrs);

            Assert.AreEqual("FooProvider", test.Name, "A3");
            Assert.AreEqual("FooProvider", test.Description, "A4");
        }
Exemple #2
0
		public void Properties ()
		{
			/* simulate what should happen with the following <provider> line:
			   <provider name="FooProvider" description="Provider for foos" />
			 */

			NameValueCollection extra_attrs = new NameValueCollection();
			extra_attrs.Add ("description", "Provider for foos");

			TestProviderBase test = new TestProviderBase ();

			test.Initialize ("FooProvider", extra_attrs);

			Assert.AreEqual ("FooProvider", test.Name, "A1");
			Assert.AreEqual ("Provider for foos", test.Description, "A2");

			/* simulate what should happen with the following <provider> line:
			   <provider name="FooProvider" /> */

			extra_attrs = new NameValueCollection();
			test = new TestProviderBase ();

			test.Initialize ("FooProvider", extra_attrs);

			Assert.AreEqual ("FooProvider", test.Name, "A3");
			Assert.AreEqual ("FooProvider", test.Description, "A4");
		}
Exemple #3
0
        public void Add_providerbase()
        {
            ProviderCollection col = new ProviderCollection();
            TestProviderBase   provider;

            provider = new TestProviderBase();
            provider.Initialize("test", null);

            col.Add(provider);

            Assert.AreEqual(provider, col["test"], "A1");
        }
		public void Add_providerbase ()
		{
			ProviderCollection col = new ProviderCollection();
			TestProviderBase provider;

			provider = new TestProviderBase();
			provider.Initialize ("test", null);

			col.Add (provider);

			Assert.AreEqual (provider, col["test"], "A1");
		}