public void CheckGetObjectReturnsSharedInstance()
        {
            LogFactoryObject fac = new LogFactoryObject();

            fac.LogName = "Foo";
            ILog log = fac.GetObject() as ILog;
            ILog anotherLogInstance = fac.GetObject() as ILog;

            Assert.IsTrue(log == anotherLogInstance,
                          "Okay, the LogFactoryObject ain't returning shared instances (it should).");
        }
		public void CheckGetObjectWorksWithValidLogName()
		{
			LogFactoryObject fac = new LogFactoryObject();
			fac.LogName = "Foo";
			ILog log = fac.GetObject() as ILog;
			Assert.IsNotNull(log, "Mmm... pulled a null ILog instance from a properly configured LogFactoryObject instance.");
		}
        public void CheckGetObjectWorksWithValidLogName()
        {
            LogFactoryObject fac = new LogFactoryObject();

            fac.LogName = "Foo";
            ILog log = fac.GetObject() as ILog;

            Assert.IsNotNull(log, "Mmm... pulled a null ILog instance from a properly configured LogFactoryObject instance.");
        }
		public void CheckGetObjectReturnsSharedInstance()
		{
			LogFactoryObject fac = new LogFactoryObject();
			fac.LogName = "Foo";
			ILog log = fac.GetObject() as ILog;
			ILog anotherLogInstance = fac.GetObject() as ILog;
			Assert.IsTrue(log == anotherLogInstance,
			              "Okay, the LogFactoryObject ain't returning shared instances (it should).");
		}
		public void CheckThatLogNamePropertyMustBeSet()
		{
			LogFactoryObject fac = new LogFactoryObject();
            Assert.Throws<ArgumentException>(() => fac.GetObject());
		}
        public void CheckThatLogNamePropertyMustBeSet()
        {
            LogFactoryObject fac = new LogFactoryObject();

            fac.GetObject();
        }
Ejemplo n.º 7
0
		public void CheckThatLogNamePropertyMustBeSet()
		{
			LogFactoryObject fac = new LogFactoryObject();
			fac.GetObject();
		}
        public void CheckThatLogNamePropertyMustBeSet()
        {
            LogFactoryObject fac = new LogFactoryObject();

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