public void GetIdFrom_CalledWhenPropertyIsNull_ExpectInvalidOperationException()
 {
     var aggregateRoot = new AggregateRoot { ObjectProperty = null };
     var getter = new TypedPropertyAggregateRootIdGetter<AggregateRoot, object>();
     getter.Invoking(x => x.GetIdFrom(aggregateRoot)).ShouldThrow<InvalidOperationException>();
 }
 public void GetIdFrom_CalledWithNullAggregateRoot_ExpectArgumentNullExceptionWithCorrectParamName()
 {
     var getter = new TypedPropertyAggregateRootIdGetter<AggregateRoot, object>();
     getter.Invoking(x => x.GetIdFrom(null)).ShouldThrow<ArgumentNullException>().And.ParamName.Should().Be("aggregateRoot");
 }