Dreamine.FullKit.Wpf.Tests 1.0.0.0
Dreamine.FullKit.Wpf.Tests 기능을 검증하는 자동화 테스트 프로젝트입니다.
로딩중...
검색중...
일치하는것 없음
Dreamine.FullKit.Wpf.Tests.Behaviors.BehaviorTests 클래스 참조sealed

더 자세히 ...

클래스

class  TestBehavior
class  TestCollectionBehavior

Public 멤버 함수

void Behavior_AttachAndDetachUpdateAssociatedObjectAndHooks ()
void BehaviorCollection_AttachesAndDetachesChildBehaviors ()
void BehaviorCollection_AttachesGenericAttachedObjectsThroughSingleContract ()
void Interaction_GetBehaviorsCreatesEmptyCollectionWithoutDefaultBehavior ()
void Interaction_SetBehaviorsAttachesExplicitCollection ()

상세한 설명

Behavior Tests 기능과 관련 상태를 캡슐화합니다.

BehaviorTests.cs 파일의 16 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ Behavior_AttachAndDetachUpdateAssociatedObjectAndHooks()

void Dreamine.FullKit.Wpf.Tests.Behaviors.BehaviorTests.Behavior_AttachAndDetachUpdateAssociatedObjectAndHooks ( )
inline

Behavior Attach And Detach Update Associated Object And Hooks 작업을 수행합니다.

BehaviorTests.cs 파일의 27 번째 라인에서 정의되었습니다.

28 {
29 var target = new DependencyObject();
30 var behavior = new TestBehavior();
31
32 behavior.Attach(target);
33
34 Assert.Same(target, behavior.AssociatedObject);
35 Assert.Equal(1, behavior.AttachedCount);
36
37 behavior.Detach();
38
39 Assert.Null(behavior.AssociatedObject);
40 Assert.Equal(1, behavior.DetachedCount);
41 }

◆ BehaviorCollection_AttachesAndDetachesChildBehaviors()

void Dreamine.FullKit.Wpf.Tests.Behaviors.BehaviorTests.BehaviorCollection_AttachesAndDetachesChildBehaviors ( )
inline

Behavior Collection Attaches And Detaches Child Behaviors 작업을 수행합니다.

BehaviorTests.cs 파일의 52 번째 라인에서 정의되었습니다.

53 {
54 var target = new DependencyObject();
55 var behavior = new TestCollectionBehavior();
56 var collection = new BehaviorCollection { behavior };
57
58 collection.Attach(target);
59 collection.Detach();
60
61 Assert.Equal(1, behavior.AttachedCount);
62 Assert.Equal(1, behavior.DetachedCount);
63 }

◆ BehaviorCollection_AttachesGenericAttachedObjectsThroughSingleContract()

void Dreamine.FullKit.Wpf.Tests.Behaviors.BehaviorTests.BehaviorCollection_AttachesGenericAttachedObjectsThroughSingleContract ( )
inline

Behavior Collection Attaches Generic Attached Objects Through Single Contract 작업을 수행합니다.

BehaviorTests.cs 파일의 74 번째 라인에서 정의되었습니다.

75 {
76 var target = new DependencyObject();
77 var behavior = new TestBehavior();
78 var collection = new BehaviorCollection { behavior };
79
80 collection.Attach(target);
81 collection.Detach();
82
83 Assert.Equal(1, behavior.AttachedCount);
84 Assert.Equal(1, behavior.DetachedCount);
85 }

◆ Interaction_GetBehaviorsCreatesEmptyCollectionWithoutDefaultBehavior()

void Dreamine.FullKit.Wpf.Tests.Behaviors.BehaviorTests.Interaction_GetBehaviorsCreatesEmptyCollectionWithoutDefaultBehavior ( )
inline

Interaction Get Behaviors Creates Empty Collection Without Default Behavior 작업을 수행합니다.

BehaviorTests.cs 파일의 96 번째 라인에서 정의되었습니다.

97 {
98 var target = new DependencyObject();
99
100 BehaviorCollection collection = Interaction.GetBehaviors(target);
101
102 Assert.Empty(collection);
103 Assert.DoesNotContain(collection, item => item is WindowDragBehavior);
104 Assert.Same(collection, Interaction.GetBehaviors(target));
105 }

◆ Interaction_SetBehaviorsAttachesExplicitCollection()

void Dreamine.FullKit.Wpf.Tests.Behaviors.BehaviorTests.Interaction_SetBehaviorsAttachesExplicitCollection ( )
inline

Interaction Set Behaviors Attaches Explicit Collection 작업을 수행합니다.

BehaviorTests.cs 파일의 116 번째 라인에서 정의되었습니다.

117 {
118 var target = new DependencyObject();
119 var behavior = new TestCollectionBehavior();
120 var collection = new BehaviorCollection { behavior };
121
122 Interaction.SetBehaviors(target, collection);
123
124 Assert.Same(collection, Interaction.GetBehaviors(target));
125 Assert.Equal(1, behavior.AttachedCount);
126 }

이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: