jacksenma 7 years ago
parent
commit
e5834452bc

+ 0 - 40
src/test/java/com/example/cinema/bl/ScheduleServiceImplTest.java

@@ -1,40 +0,0 @@
-package com.example.cinema.bl;
-
-import com.example.cinema.bl.management.ScheduleService;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-/**
- * @author fjj
- * @date 2019/4/12 3:21 PM
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class ScheduleServiceImplTest {
-
-    @Autowired
-    private ScheduleService scheduleService;
-
-//    @Test
-//    public void searchScheduleSevenDays() {
-//        ScheduleSearchForm scheduleSearchForm = new ScheduleSearchForm();
-//        scheduleSearchForm.setHallId(2);
-//        scheduleSearchForm.setStartDate(new Date());
-//        scheduleService.searchScheduleSevenDays(scheduleSearchForm);
-//    }
-
-//    @Test
-//    public void deleteBatchOfSchedule(){
-//        ScheduleBatchDeleteForm scheduleBatchDeleteForm = new ScheduleBatchDeleteForm();
-//        scheduleBatchDeleteForm.setScheduleIdList(Arrays.asList(20,21,31,26,27,28,29,30));
-//        scheduleService.deleteBatchOfSchedule(scheduleBatchDeleteForm);
-//    }
-
-//    @Test
-//    public void searchAudienceSchedule(){
-//        Date date = new Date();
-//        scheduleService.searchAudienceSchedule(10,date);
-//    }
-}

+ 0 - 35
src/test/java/com/example/cinema/bl/VIPServiceImplTest.java

@@ -1,35 +0,0 @@
-package com.example.cinema.bl;
-
-import com.example.cinema.bl.promotion.VIPService;
-import com.example.cinema.data.promotion.CouponMapper;
-import com.example.cinema.vo.ResponseVO;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-
-/**
- * Created by liying on 2019/4/14.
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class VIPServiceImplTest {
-    @Autowired
-    VIPService vipService;
-    @Autowired
-    CouponMapper couponMapper;
-
-    @Test
-    public void addVIPCard() throws Exception {
-        couponMapper.deleteCouponUser(6,15);
-    }
-
-    @Test
-    public void getCardById() throws Exception {
-        ResponseVO vo=vipService.getCardById(2);
-        vo.getContent();
-    }
-
-}

+ 0 - 25
src/test/java/com/example/cinema/blImpl/MovieServiceImplTest.java

@@ -1,25 +0,0 @@
-package com.example.cinema.blImpl;
-
-import com.example.cinema.bl.management.MovieService;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-/**
- * @author fjj
- * @date 2019/4/16 10:06 PM
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class MovieServiceImplTest {
-
-    @Autowired
-    private MovieService movieService;
-//    @Test
-//    public void pullOfBatchOfMovie() {
-//        MovieBatchOffForm movieBatchOffForm = new MovieBatchOffForm();
-//        movieBatchOffForm.setMovieIdList(Arrays.asList(10));
-//        movieService.pullOfBatchOfMovie(movieBatchOffForm);
-//    }
-}

+ 0 - 24
src/test/java/com/example/cinema/blImpl/ScheduleServiceImplTest.java

@@ -1,24 +0,0 @@
-package com.example.cinema.blImpl;
-
-import com.example.cinema.bl.management.ScheduleService;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-/**
- * @author fjj
- * @date 2019/4/21 12:08 AM
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class ScheduleServiceImplTest {
-
-    @Autowired
-    private ScheduleService scheduleService;
-    @Test
-    public void searchAudienceSchedule() {
-        scheduleService.searchAudienceSchedule(16);
-    }
-}

+ 0 - 42
src/test/java/com/example/cinema/blImpl/StatisticsServiceImplTest.java

@@ -1,42 +0,0 @@
-package com.example.cinema.blImpl;
-
-import com.example.cinema.bl.statistics.StatisticsService;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-import java.text.ParseException;
-import java.util.Calendar;
-import java.util.Date;
-
-/**
- * @author fjj
- * @date 2019/4/16 3:05 PM
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class StatisticsServiceImplTest {
-    @Autowired
-    private StatisticsService statisticsService;
-    @Test
-    public void getScheduleRateByDate() throws ParseException {
-        System.out.println(getNumDayBeforeDate(new Date(),-5));
-        statisticsService.getScheduleRateByDate(getNumDayBeforeDate(new Date(),-5));
-    }
-
-    /**
-     * 获得num天后的日期
-     * @param oldDate
-     * @param num
-     * @return
-     * @throws ParseException
-     */
-    Date getNumDayBeforeDate(Date oldDate, int num) throws ParseException {
-        Calendar calendarTime = Calendar.getInstance();
-        calendarTime.setTime(oldDate);
-        calendarTime.add(Calendar.DAY_OF_YEAR, num);
-        return calendarTime.getTime();
-    }
-}