コード例 #1
0
ファイル: RestrictionTest.cs プロジェクト: amigobv/UFO
        private void CreateTestData()
        {
            var loc = new Location(LOCATION_ID, LOCATION);
            var locationDao = new LocationDao(database);
            locationDao.Insert(loc);

            var venue = new Venue(VENUE_ID, VENUE_LABEL, VENUE_SPECTATORS, loc, 0, 0);
            var venueDao = new VenueDao(database);
            venueDao.Insert(venue);

            var category = new Category(CATEGORY_ID, CATEGORY_LABEL);
            var categoryDao = new CategoryDao(database);
            categoryDao.Insert(category);

            items = new List<Restriction>();
            items.Add(new Restriction(1, RESTRICTION1_START, RESTRICTION1_STOP, venue, category));
            items.Add(new Restriction(2, RESTRICTION2_START, RESTRICTION2_STOP, venue, category));
            items.Add(new Restriction(3, RESTRICTION3_START, RESTRICTION3_STOP, venue, category));
            items.Add(new Restriction(4, RESTRICTION4_START, RESTRICTION4_STOP, venue, category));
        }
コード例 #2
0
ファイル: PerformanceTest.cs プロジェクト: amigobv/UFO
        private void CreateTestData()
        {
            var loc = new Location(LOCATION_ID, LOCATION);
            var locationDao = new LocationDao(database);
            locationDao.Insert(loc);

            var venue = new Venue(VENUE_ID, VENUE_LABEL, VENUE_SPECTATORS, loc, 0, 0);
            var venueDao = new VenueDao(database);
            venueDao.Insert(venue);

            var category = new Category(CATEGORY_ID, CATEGORY_LABEL);
            var categoryDao = new CategoryDao(database);
            categoryDao.Insert(category);

            var artist = new Artist(ARTIST_ID, ARTIST_NAME, ARTIST_COUNTRY, ARTIST_MAIL, "", "", "", "", category, false);
            var artistDao = new ArtistDao(database);
            artistDao.Insert(artist);

            items = new List<Performance>();
            items.Add(new Performance(1, PERFORMANCE1_START, artist, venue));
            items.Add(new Performance(2, PERFORMANCE2_START, artist, venue));
            items.Add(new Performance(3, PERFORMANCE3_START, artist, venue));
            items.Add(new Performance(4, PERFORMANCE4_START, artist, venue));
        }