public void WhenValidTypeThenMatch() { var inflector = new Mock <IInflector>(); var applier = new JoinedSubclassPluralizedTableApplier(inflector.Object); applier.Match(typeof(Person)).Should().Be.True(); }
public void WhenNotValidTypeThenNoMatch() { var inflector = new Mock <IInflector>(); var applier = new JoinedSubclassPluralizedTableApplier(inflector.Object); applier.Match(null).Should().Be.False(); }
public void WhenApplyThenCallInflector() { var inflector = new Mock<IInflector>(); inflector.Setup(i => i.Pluralize("Person")).Returns("People"); var applier = new JoinedSubclassPluralizedTableApplier(inflector.Object); var mapper = new Mock<IJoinedSubclassAttributesMapper>(); applier.Apply(typeof(Person), mapper.Object); mapper.Verify(m => m.Table("People")); }
public void WhenApplyThenCallInflector() { var inflector = new Mock <IInflector>(); inflector.Setup(i => i.Pluralize("Person")).Returns("People"); var applier = new JoinedSubclassPluralizedTableApplier(inflector.Object); var mapper = new Mock <IJoinedSubclassAttributesMapper>(); applier.Apply(typeof(Person), mapper.Object); mapper.Verify(m => m.Table("People")); }
public void WhenValidTypeThenMatch() { var inflector = new Mock<IInflector>(); var applier = new JoinedSubclassPluralizedTableApplier(inflector.Object); applier.Match(typeof(Person)).Should().Be.True(); }
public void WhenNotValidTypeThenNoMatch() { var inflector = new Mock<IInflector>(); var applier = new JoinedSubclassPluralizedTableApplier(inflector.Object); applier.Match(null).Should().Be.False(); }