@@ -4,42 +4,42 @@ import { fieldValidationEventFilter } from '../fieldValidationEventFilter'
44describe ( 'FieldValidationEventFilter ' , ( ) => {
55
66 describe ( 'when calling filter ' , ( ) => {
7- it ( 'should returns new Array<FieldValidation> having only one elmenent matching the eventsFilter {OnChange : true} ' +
8- 'when passing a list of validations containg only one Element and having OnChange true for that element' , ( ) => {
7+ it ( 'should returns new Array<FieldValidation> having only one element matching the eventsFilter {onChange : true} ' +
8+ 'when passing a list of validations containg only one Element and having onChange true for that element' , ( ) => {
99 //Arrange
1010 const allValidations : FieldValidation [ ] = [
1111 {
1212 validationFn : ( vm , value ) => { return null } ,
13- eventsFilter : { OnChange : true } ,
13+ eventsFilter : { onChange : true } ,
1414 customParams : { }
1515 }
1616 ] ;
1717
18- const eventFilter = { OnChange : true } ;
18+ const eventFilter = { onChange : true } ;
1919
2020 //Act
2121 const result = fieldValidationEventFilter . filter ( allValidations , eventFilter ) ;
2222
2323 //Assert
2424 expect ( result . length ) . to . be . equal ( 1 ) ;
25- expect ( result [ 0 ] . eventsFilter . OnChange ) . to . be . true ;
25+ expect ( result [ 0 ] . eventsFilter ) . to . have . property ( 'onChange' ) . that . is . true ;
2626 } ) ;
2727
2828 } ) ;
2929
3030 describe ( 'when calling filter ' , ( ) => {
31- it ( 'should returns new Array<FieldValidation> having zero elmenent matching the eventsFilter {OnBlur : true} ' +
32- 'when passing a list of validations containg only one Element and having OnChange true for that element' , ( ) => {
31+ it ( 'should returns new Array<FieldValidation> having zero elements matching the eventsFilter {onBlur : true} ' +
32+ 'when passing a list of validations containg only one Element and having onChange true for that element' , ( ) => {
3333 //Arrange
3434 const allValidations : Array < FieldValidation > = [
3535 {
3636 validationFn : ( vm , value ) => { return null } ,
37- eventsFilter : { OnChange : true } ,
37+ eventsFilter : { onChange : true } ,
3838 customParams : { }
3939 }
4040 ] ;
4141
42- const eventsFilter = { OnBlur : true } ;
42+ const eventsFilter = { onBlur : true } ;
4343
4444 //Act
4545 const result = fieldValidationEventFilter . filter ( allValidations , eventsFilter ) ;
@@ -51,84 +51,84 @@ describe('FieldValidationEventFilter ', () => {
5151
5252 describe ( 'FieldValidationEventFilter ' , ( ) => {
5353 describe ( 'when calling filter ' , ( ) => {
54- it ( 'should returns new Array<FieldValidation> having only one elmenent matching the eventsFilter {OnChange : true} ' +
55- 'when passing a list of validations containg two elements, one OnChange the other OnBlur ' , ( ) => {
54+ it ( 'should returns new Array<FieldValidation> having only one element matching the eventsFilter {onChange : true} ' +
55+ 'when passing a list of validations containg two elements, one onChange the other onBlur ' , ( ) => {
5656 //Arrange
5757 const allValidations : Array < FieldValidation > = [
5858 {
5959 validationFn : ( vm , value ) => { return null } ,
60- eventsFilter : { OnChange : true } ,
60+ eventsFilter : { onChange : true } ,
6161 customParams : { }
6262 } ,
6363 {
6464 validationFn : ( vm , value ) => { return null } ,
65- eventsFilter : { OnBlur : true } ,
65+ eventsFilter : { onBlur : true } ,
6666 customParams : { }
6767 }
6868 ] ;
6969
70- const eventsFilter = { OnChange : true } ;
70+ const eventsFilter = { onChange : true } ;
7171
7272 //Act
7373 const result = fieldValidationEventFilter . filter ( allValidations , eventsFilter ) ;
7474
7575 //Assert
7676 expect ( result . length ) . to . be . equal ( 1 ) ;
77- expect ( result [ 0 ] . eventsFilter . OnChange ) . to . be . true ;
77+ expect ( result [ 0 ] . eventsFilter ) . to . have . property ( 'onChange' ) . that . is . true ;
7878 } ) ;
7979 } ) ;
8080 } ) ;
8181
8282 describe ( 'FieldValidationEventFilter ' , ( ) => {
8383 describe ( 'when calling filter ' , ( ) => {
84- it ( 'should returns new Array<FieldValidation> having two elements matching the eventsFilter {OnChange : true} ' +
85- 'when passing a list of validations containg three elements, two OnChange the other OnBlur ' , ( ) => {
84+ it ( 'should returns new Array<FieldValidation> having two elements matching the eventsFilter {onChange : true} ' +
85+ 'when passing a list of validations containg three elements, two onChange the other onBlur ' , ( ) => {
8686 //Arrange
8787 const allValidations : Array < FieldValidation > = [
8888 {
8989 validationFn : ( vm , value ) => { return null } ,
90- eventsFilter : { OnChange : true } ,
90+ eventsFilter : { onChange : true } ,
9191 customParams : { }
9292 } ,
9393 {
9494 validationFn : ( vm , value ) => { return null } ,
95- eventsFilter : { OnBlur : true } ,
95+ eventsFilter : { onBlur : true } ,
9696 customParams : { }
9797 } ,
9898 {
9999 validationFn : ( vm , value ) => { return null } ,
100- eventsFilter : { OnChange : true } ,
100+ eventsFilter : { onChange : true } ,
101101 customParams : { }
102102 }
103103 ] ;
104104
105- const eventsFilter = { OnChange : true } ;
105+ const eventsFilter = { onChange : true } ;
106106
107107 //Act
108108 const result = fieldValidationEventFilter . filter ( allValidations , eventsFilter ) ;
109109
110110 //Assert
111111 expect ( result . length ) . to . be . equal ( 2 ) ;
112- expect ( result [ 0 ] . eventsFilter . OnChange ) . to . be . true ;
113- expect ( result [ 1 ] . eventsFilter . OnChange ) . to . be . true ;
112+ expect ( result [ 0 ] . eventsFilter ) . to . have . property ( 'onChange' ) . that . is . true ;
113+ expect ( result [ 1 ] . eventsFilter ) . to . have . property ( 'onChange' ) . that . is . true ;
114114 } ) ;
115115 } ) ;
116116 } ) ;
117117
118118 describe ( 'FieldValidationEventFilter ' , ( ) => {
119119 describe ( 'when calling filter ' , ( ) => {
120- it ( 'should returns new Array<FieldValidation> having two elements matching the eventsFilter {OnChange : true, OnBlur : true} (OR) ' +
121- 'when passing a list of validations containg three elements, one OnChange the other OnBlur , the other OnWhatever' , ( ) => {
120+ it ( 'should returns new Array<FieldValidation> having two elements matching the eventsFilter {onChange : true, onBlur : true} (OR) ' +
121+ 'when passing a list of validations containg three elements, one onChange the other onBlur , the other OnWhatever' , ( ) => {
122122 //Arrange
123123 const allValidations : Array < FieldValidation > = [
124124 {
125125 validationFn : ( vm , value ) => { return null } ,
126- eventsFilter : { OnChange : true } ,
126+ eventsFilter : { onChange : true } ,
127127 customParams : { }
128128 } ,
129129 {
130130 validationFn : ( vm , value ) => { return null } ,
131- eventsFilter : { OnBlur : true } ,
131+ eventsFilter : { onBlur : true } ,
132132 customParams : { }
133133 } ,
134134 {
@@ -138,33 +138,33 @@ describe('FieldValidationEventFilter ', () => {
138138 }
139139 ] ;
140140
141- const eventsFilter = { OnChange : true , OnBlur : true } ;
141+ const eventsFilter = { onChange : true , onBlur : true } ;
142142
143143 //Act
144144 const result = fieldValidationEventFilter . filter ( allValidations , eventsFilter ) ;
145145
146146 //Assert
147147 expect ( result . length ) . to . be . equal ( 2 ) ;
148- expect ( result [ 0 ] . eventsFilter . OnChange ) . to . be . true ;
149- expect ( result [ 1 ] . eventsFilter . OnBlur ) . to . be . true ;
148+ expect ( result [ 0 ] . eventsFilter ) . to . have . property ( 'onChange' ) . that . is . true ;
149+ expect ( result [ 1 ] . eventsFilter ) . to . have . property ( 'onBlur' ) . that . is . true ;
150150 } ) ;
151151 } ) ;
152152 } ) ;
153153
154154 describe ( 'FieldValidationEventFilter ' , ( ) => {
155155 describe ( 'when calling filter ' , ( ) => {
156156 it ( 'should returns new Array<FieldValidation> having three elements matching the eventsFilter null ' +
157- 'when passing a list of validations containg three elements, one OnChange the other OnBlur , the other OnWhatever' , ( ) => {
157+ 'when passing a list of validations containg three elements, one onChange the other onBlur , the other OnWhatever' , ( ) => {
158158 //Arrange
159159 const allValidations : Array < FieldValidation > = [
160160 {
161161 validationFn : ( vm , value ) => { return null } ,
162- eventsFilter : { OnChange : true } ,
162+ eventsFilter : { onChange : true } ,
163163 customParams : { }
164164 } ,
165165 {
166166 validationFn : ( vm , value ) => { return null } ,
167- eventsFilter : { OnBlur : true } ,
167+ eventsFilter : { onBlur : true } ,
168168 customParams : { }
169169 } ,
170170 {
@@ -181,9 +181,9 @@ describe('FieldValidationEventFilter ', () => {
181181
182182 //Assert
183183 expect ( result . length ) . to . be . equal ( 3 ) ;
184- expect ( result [ 0 ] . eventsFilter . OnChange ) . to . be . true ;
185- expect ( result [ 1 ] . eventsFilter . OnBlur ) . to . be . true ;
186- expect ( result [ 2 ] . eventsFilter . OnWhatever ) . to . be . true ;
184+ expect ( result [ 0 ] . eventsFilter ) . to . have . property ( 'onChange' ) . that . is . true ;
185+ expect ( result [ 1 ] . eventsFilter ) . to . have . property ( 'onBlur' ) . that . is . true ;
186+ expect ( result [ 2 ] . eventsFilter ) . to . have . property ( ' OnWhatever' ) . that . is . true ;
187187 } ) ;
188188 } ) ;
189189 } ) ;
0 commit comments