Ejemplo n.º 1
0
        public void AdaptLookupFromModelToViewModel()
        {
            // arrange
            var fromValue = LookupTestUtility.CreateModel();
            var toValue   = new Benday.EasyAuthDemo.WebUi.Models.LookupEditorViewModel();

            // act
            SystemUnderTest.Adapt(fromValue, toValue);

            // assert
            LookupViewModelTestUtility.AssertAreEqual(fromValue, toValue);
        }
Ejemplo n.º 2
0
        public void AdaptLookupFromViewModelsToModels()
        {
            // arrange
            var fromValues = LookupViewModelTestUtility.CreateEditorViewModels();

            var allValuesCount = fromValues.Count;

            var toValues = new List <Benday.EasyAuthDemo.Api.DomainModels.Lookup>();

            // act
            SystemUnderTest.Adapt(fromValues, toValues);

            // assert
            Assert.AreEqual <int>(allValuesCount, toValues.Count, "Count was wrong.");
        }