@@ -41,62 +41,62 @@ describe('Cart', () => {
4141 it ( 'should add to cart' , ( ) => {
4242 expect ( cart . productLines ) . withContext ( 'cart to be empty' ) . toEqual ( [ ] ) ;
4343
44- cart . addProduct ( product1 , ProductType . paper , 1 ) ;
44+ cart . addProduct ( product1 , ProductType . Paper , 1 ) ;
4545
46- const expectedCart = [ { product : product1 , quantity : 1 , totalTaxInc : 10 , type : ProductType . paper } ] as CartLine [ ] ;
46+ const expectedCart = [ { product : product1 , quantity : 1 , totalTaxInc : 10 , type : ProductType . Paper } ] as CartLine [ ] ;
4747
4848 expect ( cart . productLines ) . withContext ( 'cart have one product' ) . toEqual ( expectedCart ) ;
4949 } ) ;
5050
5151 it ( 'should addProduct quantity for existing product into cart' , ( ) => {
52- cart . addProduct ( product1 , ProductType . paper , 1 ) ;
53- cart . addProduct ( product1 , ProductType . paper , 1 ) ;
52+ cart . addProduct ( product1 , ProductType . Paper , 1 ) ;
53+ cart . addProduct ( product1 , ProductType . Paper , 1 ) ;
5454
55- const expectedCart = [ { product : product1 , quantity : 2 , totalTaxInc : 20 , type : ProductType . paper } ] as CartLine [ ] ;
55+ const expectedCart = [ { product : product1 , quantity : 2 , totalTaxInc : 20 , type : ProductType . Paper } ] as CartLine [ ] ;
5656
5757 expect ( cart . productLines ) . withContext ( 'cart have one product' ) . toEqual ( expectedCart ) ;
5858 expect ( cart . totalTaxInc ) . toEqual ( 20 ) ;
5959 } ) ;
6060
6161 it ( 'should add two different products to cart' , ( ) => {
62- cart . addProduct ( product1 , ProductType . paper , 1 ) ;
63- cart . addProduct ( product2 , ProductType . paper , 1 ) ;
62+ cart . addProduct ( product1 , ProductType . Paper , 1 ) ;
63+ cart . addProduct ( product2 , ProductType . Paper , 1 ) ;
6464
6565 const expectedCart = [
66- { product : product1 , quantity : 1 , totalTaxInc : 10 , type : ProductType . paper } ,
67- { product : product2 , quantity : 1 , totalTaxInc : 100 , type : ProductType . paper } ,
66+ { product : product1 , quantity : 1 , totalTaxInc : 10 , type : ProductType . Paper } ,
67+ { product : product2 , quantity : 1 , totalTaxInc : 100 , type : ProductType . Paper } ,
6868 ] as CartLine [ ] ;
6969
7070 expect ( cart . productLines ) . toEqual ( expectedCart ) ;
7171 expect ( cart . totalTaxInc ) . toEqual ( 110 ) ;
7272 } ) ;
7373
7474 it ( 'should add more than one unit to cart' , ( ) => {
75- cart . addProduct ( product1 , ProductType . paper , 2 ) ;
75+ cart . addProduct ( product1 , ProductType . Paper , 2 ) ;
7676
77- const expectedCart = [ { product : product1 , quantity : 2 , totalTaxInc : 20 , type : ProductType . paper } ] as CartLine [ ] ;
77+ const expectedCart = [ { product : product1 , quantity : 2 , totalTaxInc : 20 , type : ProductType . Paper } ] as CartLine [ ] ;
7878
7979 expect ( cart . productLines ) . toEqual ( expectedCart ) ;
8080 expect ( cart . totalTaxInc ) . toEqual ( 20 ) ;
8181 } ) ;
8282
8383 it ( 'should add decimals quantity' , ( ) => {
84- cart . addProduct ( product3 , ProductType . paper , 0.5 ) ;
84+ cart . addProduct ( product3 , ProductType . Paper , 0.5 ) ;
8585
8686 const expectedCart = [
87- { product : product3 , quantity : 0.5 , totalTaxInc : 500 , type : ProductType . paper } ,
87+ { product : product3 , quantity : 0.5 , totalTaxInc : 500 , type : ProductType . Paper } ,
8888 ] as CartLine [ ] ;
8989
9090 expect ( cart . productLines ) . toEqual ( expectedCart ) ;
9191 expect ( cart . totalTaxInc ) . toEqual ( 500 ) ;
9292 } ) ;
9393
9494 it ( 'should add product decimals quantity to existing products in cart' , ( ) => {
95- cart . addProduct ( product3 , ProductType . paper , 0.5 ) ;
96- cart . addProduct ( product3 , ProductType . paper , 2.5 ) ;
95+ cart . addProduct ( product3 , ProductType . Paper , 0.5 ) ;
96+ cart . addProduct ( product3 , ProductType . Paper , 2.5 ) ;
9797
9898 const expectedCart = [
99- { product : product3 , quantity : 3 , totalTaxInc : 3000 , type : ProductType . paper } ,
99+ { product : product3 , quantity : 3 , totalTaxInc : 3000 , type : ProductType . Paper } ,
100100 ] as CartLine [ ] ;
101101
102102 expect ( cart . productLines ) . toEqual ( expectedCart ) ;
0 commit comments