Ejemplo n.º 1
0
            public void should_mark_as_updated_and_return_entity()
            {
                //act
                var result = Repository.Update(new TestEntity()
                {
                    Id = 4, Field = "Super"
                });

                //assert
                A.CallTo(() => SessionScope.MarkAsUpdated(A <TestEntity> .That.Matches(t => t.Id == 4 && t.Field == "Super"))).MustHaveHappened();
                result.Id.Should().Be(4);
                result.Field.Should().Be("Super");
            }