public void ShouldMapDomainToViewModel()
        {
            const int Id = 1;
            const int Value = 100;
            const string Name = "Name";
            var domainStub = new DomainStub { Id = Id, Name1 = Name, Value1 = Value };

            var viewModelStub = DomainViewModelMapper<DomainStub, ViewModelStub>.Map(domainStub);

            Assert.That(viewModelStub.Id, Is.EqualTo(Id));
            Assert.That(viewModelStub.Name1, Is.EqualTo(Name));
            Assert.That(viewModelStub.Value1, Is.EqualTo(Value));
        }
Beispiel #2
0
        public void ShouldMapDomainToViewModel()
        {
            const int    Id         = 1;
            const int    Value      = 100;
            const string Name       = "Name";
            var          domainStub = new DomainStub {
                Id = Id, Name1 = Name, Value1 = Value
            };

            var viewModelStub = DomainViewModelMapper <DomainStub, ViewModelStub> .Map(domainStub);

            Assert.That(viewModelStub.Id, Is.EqualTo(Id));
            Assert.That(viewModelStub.Name1, Is.EqualTo(Name));
            Assert.That(viewModelStub.Value1, Is.EqualTo(Value));
        }