Subversion Repositories SmartDukaan

Rev

Rev 23112 | Rev 23203 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23112 Rev 23173
Line 1... Line 1...
1
package com.spice.profitmandi.service.generic;
1
package com.spice.profitmandi.service.generic;
2
 
2
 
3
 
3
 
-
 
4
import java.util.Arrays;
-
 
5
 
4
import org.junit.Ignore;
6
import org.junit.Ignore;
5
import org.junit.Test;
7
import org.junit.Test;
6
import org.junit.runner.RunWith;
8
import org.junit.runner.RunWith;
7
import org.slf4j.Logger;
9
import org.slf4j.Logger;
8
import org.slf4j.LoggerFactory;
10
import org.slf4j.LoggerFactory;
9
import org.springframework.beans.factory.annotation.Autowired;
11
import org.springframework.beans.factory.annotation.Autowired;
10
import org.springframework.test.context.ContextConfiguration;
12
import org.springframework.test.context.ContextConfiguration;
11
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
13
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
12
import org.springframework.test.context.web.WebAppConfiguration;
14
import org.springframework.test.context.web.WebAppConfiguration;
13
import org.springframework.test.annotation.Rollback;
-
 
14
import org.springframework.transaction.annotation.Transactional;
15
import org.springframework.transaction.annotation.Transactional;
15
 
16
 
16
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
17
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
-
 
18
import com.spice.profitmandi.common.util.Utils;
-
 
19
import com.spice.profitmandi.dao.entity.catalog.Item;
17
import com.spice.profitmandi.dao.entity.fofo.InvoiceNumberGenerationSequence;
20
import com.spice.profitmandi.dao.entity.fofo.InvoiceNumberGenerationSequence;
-
 
21
import com.spice.profitmandi.dao.repository.GenericRepository;
-
 
22
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
18
import com.spice.profitmandi.dao.repository.fofo.InvoiceNumberGenerationSequenceRepository;
23
import com.spice.profitmandi.dao.repository.fofo.InvoiceNumberGenerationSequenceRepository;
19
import com.spice.profitmandi.service.pricing.PriceDropService;
24
import com.spice.profitmandi.service.pricing.PriceDropService;
20
import com.spice.profitmandi.service.scheme.SchemeService;
25
import com.spice.profitmandi.service.scheme.SchemeService;
21
import com.spice.profitmandi.web.config.AppConfig;
26
import com.spice.profitmandi.web.config.AppConfig;
22
 
27
 
Line 36... Line 41...
36
	private InvoiceNumberGenerationSequenceRepository invoiceNumberGenerationSequenceRepository;
41
	private InvoiceNumberGenerationSequenceRepository invoiceNumberGenerationSequenceRepository;
37
	
42
	
38
	@Autowired
43
	@Autowired
39
	private PriceDropService priceDropService;
44
	private PriceDropService priceDropService;
40
	
45
	
-
 
46
	@Autowired
-
 
47
	private GenericRepository genericRepository;
-
 
48
	
-
 
49
	@Autowired
-
 
50
	private ItemRepository itemRepository;
-
 
51
	
41
	//@Test
52
	//@Test
42
	@Ignore
53
	@Ignore
43
	//@Rollback(false)
54
	//@Rollback(false)
44
	public void testprocessSchemeOut() throws ProfitMandiBusinessException{
55
	public void testprocessSchemeOut() throws ProfitMandiBusinessException{
45
		//throw new ProfitMandiBusinessException("", "", "");
56
		//throw new ProfitMandiBusinessException("", "", "");
Line 73... Line 84...
73
		}
84
		}
74
		invoiceNumberGenerationSequenceRepository.persist(invoiceNumberGenerationSequence);
85
		invoiceNumberGenerationSequenceRepository.persist(invoiceNumberGenerationSequence);
75
		LOGGER.info("invoiceNumberSequence {}", invoiceNumberGenerationSequence.getSequence());
86
		LOGGER.info("invoiceNumberSequence {}", invoiceNumberGenerationSequence.getSequence());
76
	}
87
	}
77
	
88
	
78
	@Test
89
	@Ignore
79
	public void testAddPriceDropAmountToWallet() {
90
	public void testAddPriceDropAmountToWallet() {
80
		priceDropService.addPriceDropAmountToWallet();
91
		priceDropService.addPriceDropAmountToWallet();
81
	}
92
	}
-
 
93
	
-
 
94
	@Ignore
-
 
95
	public void testCriteriaBuilderSelectAll(){
-
 
96
		//LOGGER.info("brands {}", genericRepository.selectById(Item.class, 2));
-
 
97
		//LOGGER.info("TEST RESULT {}", itemRepository.selectIdsByIdsAndType(new HashSet<>(Arrays.asList(1,2,3,4,5)), ItemType.SERIALIZED));
-
 
98
		LOGGER.info("Test Result {}", genericRepository.selectById(Item.class, -2));
-
 
99
	}
-
 
100
	
-
 
101
	@Ignore
-
 
102
	public void testStateTaxRate() throws ProfitMandiBusinessException{
-
 
103
		LOGGER.info("stateTaxRate {}", Utils.getStateTaxRate(Arrays.asList(1,2), 1));
-
 
104
	}
-
 
105
	
-
 
106
	@Ignore
-
 
107
	public void testIgstTaxRate() throws ProfitMandiBusinessException{
-
 
108
		LOGGER.info("igstTaxRate {}", Utils.getIgstTaxRate(Arrays.asList(1,2)));
-
 
109
	}
82
}
110
}