示例#1
0
        public void Should_add_bugfix_for_fix_commit()
        {
            bugFixDetector.IsBugFix(Arg.Any <Commit>())
            .Returns(true);

            mapper.Map(
                mappingDSL.AddCommit("1")
                );
            SubmitChanges();

            Get <CommitAttribute>().Count()
            .Should().Be(1);
            Get <CommitAttribute>().Single().Commit.Revision
            .Should().Be("1");
        }
示例#2
0
        public void Should_use_output_expression_for_registered_mapper()
        {
            CommitMappingExpression commitExp = data.UsingSession(
                s => s.MappingDSL().AddCommit("1"));

            commitMapper
            .Map(Arg.Any <RepositoryMappingExpression>())
            .Returns(new CommitMappingExpression[] { commitExp });
            bugFixMapper
            .Map(Arg.Any <CommitMappingExpression>())
            .Returns(Enumerable.Empty <BugFixMappingExpression>());

            mapper.RegisterMapper(commitMapper);
            mapper.RegisterMapper(bugFixMapper);
            mapper.MapRevision("1");

            bugFixMapper.Received(1)
            .Map(Arg.Is(commitExp));
        }