Exemplo n.º 1
0
        public void DictionaryPropertyUpdate()
        {
            var viewModel = new AggregateViewModel { Name = "Awesome name", ValueFromDictionary = "Awefull object" };
            var entity = new AggregateEntity();

            viewModel.Update(entity);

            entity.Name.Should().Be("Awesome name");
            entity.EntityFromDictionary.Should().BeNull();
        }
Exemplo n.º 2
0
        public void DictionaryPropertyFill()
        {
            var entity = new AggregateEntity
                { Name = "Awesome Aggregate", EntityFromDictionary = new SimpleEntity { Name = "Awefull object" } };
            var viewModel = new AggregateViewModel();

            viewModel.Fill(entity);

            viewModel.Name.Should().Be("Awesome Aggregate");
            viewModel.ValueFromDictionary.Should().Be("Awefull object");
        }