public void Dto_with_no_properties_causes_null_exception() { using (var context = new SomeContext(InMemoryOptions.Create <SomeContext>())) { //ATTEMPT var ex = Assert.Throws <InvalidOperationException>(() => context.SetupSingleDtoAndEntities <ImutableDto>()); //VERIFY ex.Message.ShouldEqual("The ImutableDto class inherits ILinkToEntity<T> but has no properties in it!"); } }
public void Dto_with_no_properties_causes_null_exception() { using (var context = new SomeContext(InMemoryOptions.Create <SomeContext>())) { //ATTEMPT var ex = Assert.Throws <InvalidOperationException>(() => context.SetupSingleDtoAndEntities <ImutableDto>()); //VERIFY ex.Message.ShouldEqual("A DTO using the ILinkToEntity<T> must contain at least one Property!"); } }