Exemplo n.º 1
0
        public void WhenValidTypeThenMatch()
        {
            var inflector = new Mock <IInflector>();
            var applier   = new JoinedSubclassPluralizedTableApplier(inflector.Object);

            applier.Match(typeof(Person)).Should().Be.True();
        }
Exemplo n.º 2
0
        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"));
        }
Exemplo n.º 4
0
        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();
 }