예제 #1
0
        public void MergeDisableDeleted()
        {
            var _targets = MergeDataGenerater.GetTargets();
            var _sources = MergeDataGenerater.GetSources();

            var _option = new DataMergeOption();

            _option.GetDeletedList = false;

            var _memberDataMerge = new MemberDataMerge(_option);

            _memberDataMerge.Merge(_targets, _sources);

            var _actualCreatedList = _memberDataMerge.Created;
            var _expectCreatedList = MergeDataGenerater.GetExpectCreatedList();

            Assert.Equal(_actualCreatedList, _expectCreatedList);

            var _actualUpdatedList = _memberDataMerge.Updated;
            var _expectUpdatedList = MergeDataGenerater.GetExpectUpdatedList();

            Assert.Equal(_actualUpdatedList, _expectUpdatedList);

            var _actualDeletedList = _memberDataMerge.Deleted;

            Assert.Null(_actualDeletedList);
        }
예제 #2
0
        public void DefaultMergeOption()
        {
            var _targets = MergeDataGenerater.GetTargets();
            var _sources = MergeDataGenerater.GetSources();

            var _memberDataMerge = new MemberDataMerge();

            _memberDataMerge.Merge(_targets, _sources);

            var _actualCreatedList = _memberDataMerge.Created;
            var _expectCreatedList = MergeDataGenerater.GetExpectCreatedList();

            Assert.Equal(_actualCreatedList, _expectCreatedList);

            var _actualUpdatedList = _memberDataMerge.Updated;
            var _expectUpdatedList = MergeDataGenerater.GetExpectUpdatedList();

            Assert.Equal(_actualUpdatedList, _expectUpdatedList);

            var _actualDeletedList = _memberDataMerge.Deleted;
            var _expectDeletedList = MergeDataGenerater.GetExpectDeletedList();

            Assert.Equal(_actualDeletedList, _expectDeletedList);
        }