public void GetObjectWithoutSupplyingASourceSet() { SetFactoryObject lfo = new SetFactoryObject(); lfo.IsSingleton = false; Assert.Throws <ArgumentException>(() => lfo.GetObject(), "The 'SourceSet' property cannot be null (Nothing in Visual Basic.NET)."); }
public void SetTargetSetTypeToNull() { SetFactoryObject lfo = new SetFactoryObject(); Assert.Throws <ArgumentNullException>(() => lfo.TargetSetType = null); }
public void SetTargetSetTypeToDerivedISetInterfaceType() { SetFactoryObject lfo = new SetFactoryObject(); Assert.Throws <ArgumentException>(() => lfo.TargetSetType = typeof(IExtendedSet), "The Type passed to the TargetSetType property cannot be an interface; it must be a concrete class that implements the 'Oragon.Spring.Collections.ISet' interface."); }
public void SetTargetSetTypeToAbstractISetInterfaceType() { SetFactoryObject lfo = new SetFactoryObject(); Assert.Throws <ArgumentException>(() => lfo.TargetSetType = typeof(AbstractSet), "The Type passed to the TargetSetType property cannot be abstract (MustInherit in VisualBasic.NET); it must be a concrete class that implements the 'Oragon.Spring.Collections.ISet' interface."); }
public void SetTargetSetTypeToNonSetType() { SetFactoryObject lfo = new SetFactoryObject(); Assert.Throws <ArgumentException>(() => lfo.TargetSetType = typeof(ICollection), "The Type passed to the TargetSetType property must implement the 'Oragon.Spring.Collections.ISet' interface."); }