Ejemplo n.º 1
0
        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!");
            }
        }
Ejemplo n.º 2
0
        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!");
            }
        }