예제 #1
0
        public void EmptyDtoTests()
        {
            DtoInfo <EmptyDto> info = DtoInfo.GetInfo <EmptyDto>();

            info.Properties.Should().BeEmpty();
            info.CreateNew().GetType().Should().Be(typeof(EmptyDto));
            info.ShallowClone(new EmptyDto()).Should().NotBeNull();
            Invoking(() => info.GetProperty("Nope")).Should().Throw <ArgumentException>();
            info.TryGetProperty("Nope").Should().BeNull();
            Invoking(() => info.GetProperty <int>("Nope")).Should().Throw <ArgumentException>();
            info.TryGetProperty <int>("Nope").Should().BeNull();
        }