public void GivenBehaviourForFooIsDefinedAsFollowing(string instanceName, Table table) { Instance.Of<IHaveDoubles>().Named(instanceName).Setup( table.AsCommandBehaviour<IHaveDoubles>(With.Syntax.Natural) ); }
public void GivenTheSpyReceiverImplementsTheFollowingBehaviour(Table table) { Instance.Of<Receiver>().IsTestDouble().Setup( table.AsCommandBehaviour<Receiver>(With.Syntax.Natural) ); Assert.That( Instance.Of<Receiver>().Object, Is.Not.Null, "No instance of receiver created" ); Assert.False( Instance.Of<Exception>().Exists, string.Format("Unexpected {0}",Instance.Of<Exception>()) ); }