@@ -31,45 +31,45 @@ describe('RequestBody', () => {
3131 }
3232 } ) ;
3333 } ) ;
34- describe ( 'toJSON' , ( ) => {
35- test ( 'Should return the set values as new json object' , ( ) => {
36- const r = new RequestBody ( { a : 1 } ) ;
37- const o = r . toJSON ( ) ;
38- expect ( o . a ) . toBe ( 1 ) ;
39- } ) ;
40- } ) ;
41- describe ( 'set' , ( ) => {
42- test ( 'Should set value the key property' , ( ) => {
43- class TestBody extends RequestBody {
44- @IsNotEmpty ( ) value : string ;
34+ // describe('toJSON', () => {
35+ // test('Should return the set values as new json object', () => {
36+ // const r = new RequestBody({ a: 1 });
37+ // const o = r.toJSON();
38+ // expect(o.a).toBe(1);
39+ // });
40+ // });
41+ // describe('set', () => {
42+ // test('Should set value the key property', () => {
43+ // class TestBody extends RequestBody {
44+ // @IsNotEmpty () value: string;
4545
46- setValue ( value : string ) : void {
47- this . set ( 'value' , value ) ;
48- }
49- }
50- const tb = new TestBody ( ) ;
51- tb . setValue ( 'yes' ) ;
52- expect ( tb . value ) . toBe ( 'yes' ) ;
53- } ) ;
54- } ) ;
55- describe ( 'update' , ( ) => {
56- test ( 'Should set value the key property' , ( ) => {
57- class TestBody extends RequestBody {
58- @IsNotEmpty ( ) valueA : string ;
59- @IsNotEmpty ( ) valueB : string ;
46+ // setValue(value: string): void {
47+ // this.set('value', value);
48+ // }
49+ // }
50+ // const tb = new TestBody();
51+ // tb.setValue('yes');
52+ // expect(tb.value).toBe('yes');
53+ // });
54+ // });
55+ // describe('update', () => {
56+ // test('Should set value the key property', () => {
57+ // class TestBody extends RequestBody {
58+ // @IsNotEmpty () valueA: string;
59+ // @IsNotEmpty () valueB: string;
6060
61- updateValue ( key : string , value : any ) : void {
62- this . update ( key , value ) ;
63- }
64- }
65- const tb = new TestBody ( {
66- valueA : 'no' ,
67- valueB : 'no'
68- } ) ;
69- tb . updateValue ( 'valueA' , 'yes' ) ;
70- tb . updateValue ( 'valueB' , undefined ) ;
71- expect ( tb . valueA ) . toBe ( 'yes' ) ;
72- expect ( tb . valueB ) . toBe ( 'no' ) ;
73- } ) ;
74- } ) ;
61+ // updateValue(key: string, value: any): void {
62+ // this.update(key, value);
63+ // }
64+ // }
65+ // const tb = new TestBody({
66+ // valueA: 'no',
67+ // valueB: 'no'
68+ // });
69+ // tb.updateValue('valueA', 'yes');
70+ // tb.updateValue('valueB', undefined);
71+ // expect(tb.valueA).toBe('yes');
72+ // expect(tb.valueB).toBe('no');
73+ // });
74+ // });
7575} ) ;
0 commit comments