本文整理汇总了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 );
}
示例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 );
}
示例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() );
}
示例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 );
}
示例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 );
}
示例6: service_getChangeSet_with_null_iChangeSetFilter
public void service_getChangeSet_with_null_iChangeSetFilter()
{
ChangeTrackingService svc = new ChangeTrackingService();
svc.GetChangeSet( null );
}
示例7: service_getChangeSet_with_null_iChangeSetFilter_argumentNullExeption
public void service_getChangeSet_with_null_iChangeSetFilter_argumentNullExeption()
{
ChangeTrackingService svc = new ChangeTrackingService();
svc.GetChangeSet( null );
}
示例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 );
}
示例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 );
}