public void LookupWithExpectedTypeAndMatch() { JndiLookupFactoryObject jfo = new JndiLookupFactoryObject(); string s = ""; jfo.JndiLookupContext = new ExpectedLookupContext("foo", s); jfo.JndiName = "foo"; jfo.ExpectedType = typeof (string); jfo.AfterPropertiesSet(); Assert.AreEqual(s, jfo.GetObject()); }
public void LookupWithExpectedTypeAndMatch() { JndiLookupFactoryObject jfo = new JndiLookupFactoryObject(); string s = ""; jfo.JndiLookupContext = new ExpectedLookupContext("foo", s); jfo.JndiName = "foo"; jfo.ExpectedType = typeof(string); jfo.AfterPropertiesSet(); Assert.AreEqual(s, jfo.GetObject()); }
public void LookupWithDefaultObjectAndExpectedType() { JndiLookupFactoryObject jfo = new JndiLookupFactoryObject(); string s = ""; jfo.JndiLookupContext = new ExpectedLookupContext("foo", s); jfo.JndiName = "myFoo"; jfo.ExpectedType = typeof (string); jfo.DefaultObject = "myString"; jfo.AfterPropertiesSet(); Assert.AreEqual("myString", jfo.GetObject()); }
public void LookupWithDefaultObjectAndExpectedType() { JndiLookupFactoryObject jfo = new JndiLookupFactoryObject(); string s = ""; jfo.JndiLookupContext = new ExpectedLookupContext("foo", s); jfo.JndiName = "myFoo"; jfo.ExpectedType = typeof(string); jfo.DefaultObject = "myString"; jfo.AfterPropertiesSet(); Assert.AreEqual("myString", jfo.GetObject()); }