示例#1
0
        public void should_map_lazy_loaded_values_should_not_be_inject_if_not_loaded()
        {
            var modelWithLazy = new ModelWithLazy()
            {
                Guid = new TestLazyLoaded <Guid>()
            };

            modelWithLazy.InjectTo <ModelWithNoLazy>().Guid.Should().BeEmpty();

            modelWithLazy.Guid.IsLoaded.Should().BeFalse();
        }
示例#2
0
        public void should_map_lay_loaded_values_should_be_inject_if_loaded()
        {
            var guid = Guid.NewGuid();

            var modelWithLazy = new ModelWithLazy()
            {
                Guid = new LazyLoaded <Guid>(guid)
            };

            modelWithLazy.InjectTo <ModelWithNoLazy>().Guid.Should().Be(guid);

            modelWithLazy.Guid.IsLoaded.Should().BeTrue();
        }