當前位置: 首頁>>代碼示例>>C#>>正文


C# ChangeTrackingService.GetChangeSet方法代碼示例

本文整理匯總了C#中Topics.Radical.ChangeTracking.ChangeTrackingService.GetChangeSet方法的典型用法代碼示例。如果您正苦於以下問題:C# ChangeTrackingService.GetChangeSet方法的具體用法?C# ChangeTrackingService.GetChangeSet怎麽用?C# ChangeTrackingService.GetChangeSet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Topics.Radical.ChangeTracking.ChangeTrackingService的用法示例。


在下文中一共展示了ChangeTrackingService.GetChangeSet方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: after_Add_getChangeSet_contains_change

        public void after_Add_getChangeSet_contains_change()
        {
            IChangeTrackingService svc = new ChangeTrackingService();

            PersonCollection p = new PersonCollection( svc );
            p.Add( new Person( svc, false ) );
            p.Add( new Person( svc, false ) );

            IChangeSet cSet = svc.GetChangeSet();

            cSet.Count.Should().Be.EqualTo( 2 );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:12,代碼來源:CollectionChangeTrackingServiceTests.cs

示例2: afterPropertyChanges_getChangeSet_contains_change

        public void afterPropertyChanges_getChangeSet_contains_change()
        {
            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc, false );
            p.Name = "Mauro";
            p.Name = "Andrea";

            IChangeSet cSet = svc.GetChangeSet();

            Assert.AreEqual<Int32>( 2, cSet.Count );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:12,代碼來源:EntityChangeTrackingServiceTests.cs

示例3: service_after_add_getChangeSet_return_valid_cSet

        public void service_after_add_getChangeSet_return_valid_cSet()
        {
            RejectCallback<String> cb = cv => { };
            Object fakeOwner = new Object();
            String change = String.Empty;
            IChange expected = new PropertyValueChange<String>( fakeOwner, "property-name", change, cb );

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Add( expected, AddChangeBehavior.RedoRequest );

            IChangeSet cSet = svc.GetChangeSet();

            Assert.AreEqual<IChange>( expected, cSet.First() );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:14,代碼來源:EntityChangeTrackingServiceTests.cs

示例4: service_getChangeSet_returns_valid_cSet

        public void service_getChangeSet_returns_valid_cSet()
        {
            Int32 expected = 2;
            Int32 actual = 0;

            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc, true );
            p.Name = "Mauro";
            p.Name = "Mauro";
            p.Name = "Foo";

            IChangeSet cSet = svc.GetChangeSet();
            actual = cSet.Count;

            Assert.AreEqual<Int32>( expected, actual );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:17,代碼來源:EntityChangeTrackingServiceTests.cs

示例5: service_getChangeSet_with_valid_iChangeSetFilter

        public void service_getChangeSet_with_valid_iChangeSetFilter()
        {
            Int32 expected = 2;
            Int32 actual = 0;

            IChangeSetFilter mock = MockRepository.GenerateMock<IChangeSetFilter>();
            mock.Expect( f => f.ShouldInclude( null ) )
                .IgnoreArguments()
                .Repeat.Times( 2 )
                .Return( true );

            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc, true );
            p.Name = "Mauro";
            p.Name = "Mauro";
            p.Name = "Foo";

            IChangeSet cSet = svc.GetChangeSet( mock );
            actual = cSet.Count;

            mock.VerifyAllExpectations();
            Assert.AreEqual<Int32>( expected, actual );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:24,代碼來源:EntityChangeTrackingServiceTests.cs

示例6: service_getChangeSet_with_null_iChangeSetFilter

 public void service_getChangeSet_with_null_iChangeSetFilter()
 {
     ChangeTrackingService svc = new ChangeTrackingService();
     svc.GetChangeSet( null );
 }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:5,代碼來源:EntityChangeTrackingServiceTests.cs

示例7: service_getChangeSet_with_null_iChangeSetFilter_argumentNullExeption

 public void service_getChangeSet_with_null_iChangeSetFilter_argumentNullExeption()
 {
     ChangeTrackingService svc = new ChangeTrackingService();
     svc.GetChangeSet( null );
 }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:5,代碼來源:EntityChangeTrackingServiceTests.cs

示例8: service_getChangeSet_when_is_not_changed_empty_cSet

        public void service_getChangeSet_when_is_not_changed_empty_cSet()
        {
            ChangeTrackingService svc = new ChangeTrackingService();
            IChangeSet cSet = svc.GetChangeSet();

            Assert.IsNotNull( cSet );
            Assert.AreEqual<Int32>( 0, cSet.Count );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:8,代碼來源:EntityChangeTrackingServiceTests.cs

示例9: service_getChangeSet_returns_valid_cSet

        public void service_getChangeSet_returns_valid_cSet()
        {
            Int32 expected = 3;
            Int32 actual = 0;

            ChangeTrackingService svc = new ChangeTrackingService();

            PersonCollection p = new PersonCollection( svc );
            p.Add( new Person( null, false ) );
            p.Add( new Person( null, false ) );
            p.Move( 0, 1 );

            IChangeSet cSet = svc.GetChangeSet();
            actual = cSet.Count;

            Assert.AreEqual<Int32>( expected, actual );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:17,代碼來源:CollectionChangeTrackingServiceTests.cs


注:本文中的Topics.Radical.ChangeTracking.ChangeTrackingService.GetChangeSet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。