Model MbUnit Expansion snippet for a Model model Expansion
namespace Model namespace type Modelled type Put the modelled type here basetype Modelled Base Type Object /// A implementation for the /// type. /// [Model(typeof($type$))] // [State("Put a state name here")] // [SubModel("Put a submodel name here")] public class $type$Model : $basetype$Model { #region Constructors /// /// Initializes a new instance. /// public $type$Model() :base() {} /// /// Initializes a new instance /// to model the type. /// /// /// Target of the model /// public $type$Model(Type modelledType) :base(modelledType) { if (!typeof($type$).IsAssignableFrom(modelledType)) throw new ArgumentException("$type$ is not assignable from "+modelledType.FullName,"modelledType"); } #endregion #region Transitions [Transition] public void SampleTransition($type$ target) { throw new NotImplemented(); } /// /// Gets the active instance for /// current . /// /// /// Collection of active names /// /// /// Current tested instance /// protected override void GetActiveTransitions( ITransitionNameCollection transitions, Object target ) { base.GetActiveTransitions(transitions,target); $type$ current = ($type$)target; $end$ } #endregion } } ]]>