private SampleDomainModel BuildSampleDomainModel()
 {
     var model = new SampleDomainModel();
     var setter = new SampleValueSetter();
     setter.AssignSampleValues(model, 0);
     return model;
 }
        public int Save(SampleDomainModel domainModel)
        {
            MockDatabase["StringValue"] = domainModel.StringValue;
            MockDatabase["BoolValue"] = domainModel.BoolValue;
            MockDatabase["DateTimeValue"] = domainModel.DateTimeValue;
            MockDatabase["GuidValue"] = domainModel.GuidValue;
            MockDatabase["IntValue"] = domainModel.IntValue;
            MockDatabase["CreatedAt"] = DateTime.UtcNow;

            return 1;
        }
        public SampleDomainModel GetById(int id)
        {
            var domainModel = new SampleDomainModel();
            domainModel.StringValue = (string) MockDatabase["StringValue"];
            domainModel.BoolValue = (bool) MockDatabase["BoolValue"];
            domainModel.DateTimeValue = (DateTime) MockDatabase["DateTimeValue"];
            domainModel.GuidValue = (Guid) MockDatabase["GuidValue"];
            domainModel.IntValue = (int) MockDatabase["IntValue"];
            domainModel.CreatedAt = (DateTime)MockDatabase["CreatedAt"];

            return domainModel;
        }
        public void Source_property_change_should_result_in_destination_property_change()
        {
            var setter = new SampleValueSetter();
            var comparer = new ObjectComparer();
            var viewModelFactory = new SampleViewModelFactory();

            var domainModel1 = new SampleDomainModel();
            setter.AssignSampleValues(domainModel1, 0);
            var viewModel1 = viewModelFactory.Build(domainModel1);

            var domainModel2 = new SampleDomainModel();
            setter.AssignSampleValues(domainModel2, 1);
            var viewModel2 = viewModelFactory.Build(domainModel2);

            comparer.AssertDifference(viewModel1, viewModel2, new []
            {
                "/StaticValue - static value"
            });
        }