public void MissingAssemblyName()
        {
            ResourceManagerFactoryObject fac = new ResourceManagerFactoryObject();

            fac.BaseName = "Oragon.Spring.Resources.SampleResources";
            Assert.Throws <ArgumentException>(() => fac.AfterPropertiesSet());
        }
        public void WithRubbishAssemblyName()
        {
            ResourceManagerFactoryObject fac = new ResourceManagerFactoryObject();

            fac.BaseName     = "Oragon.Spring.Resources.SampleResources";
            fac.AssemblyName = "I'mAJumpedUpPantryBoy";
            Assert.Throws <ArgumentException>(() => fac.AfterPropertiesSet());
        }
        public void CreateResourceManager()
        {
            ResourceManagerFactoryObject fac = new ResourceManagerFactoryObject();

            fac.BaseName     = "Oragon.Spring.Resources.SampleResources";
            fac.AssemblyName = "Oragon.Spring.Core.Tests";
            fac.AfterPropertiesSet();
            Assert.AreEqual(typeof(ResourceManager), fac.ObjectType);
            object actual = fac.GetObject();

            Assert.IsNotNull(actual);
            Assert.AreEqual(typeof(ResourceManager), actual.GetType());
            ResourceManager rm      = (ResourceManager)actual;
            string          message = rm.GetString("message");

            Assert.AreEqual("Hello {0} {1}", message);
        }
        public void MissingBaseName()
        {
            ResourceManagerFactoryObject fac = new ResourceManagerFactoryObject();

            Assert.Throws <ArgumentException>(() => fac.AfterPropertiesSet());
        }