예제 #1
0
        public void SetThrowsExceptionWithNullActionTest()
        {
            var target = new Person();

            Action action = () => target.Set(null);

            action.ShouldThrow<ArgumentNullException>();
        }
예제 #2
0
        public void SetRunsActionAgainstInstanceTest()
        {
            var value = Guid.NewGuid();
            var target = new Person();

            var actual = target.Set(x => x.Id = value);

            actual.Should().BeSameAs(target);
            actual.Id.Should().Be(value);
        }