示例#1
0
        public void CanAddAct()
        {
            Guid id = new Guid();
            string name = "Seizures";
            Guid artistId = new Guid();

            Act act         = new Act();
            act.ID          = id;
            act.Name        = name;
            act.ArtistID    = artistId;

            Assert.That(act.ID,
               Is.EqualTo(id));
            Assert.That(act.Name,
                Is.EqualTo(name));
            Assert.That(act.ArtistID,
                Is.EqualTo(artistId));
        }
示例#2
0
        public void CanAddGig()
        {
            Guid gigId = new Guid();
            string gigName = "Seizures first gig";
            string gigDescription = "Seizures play their first gig in Manchester!";
            DateTime startDate = new DateTime();
            DateTime endDate = new DateTime();
            string gigTicketPrice = "£6";

            Guid actId = new Guid();
            string actName = "Seizures";

            Act act = new Act();
            act.ID = actId;
            act.Name = actName;

            Gig gig             = new Gig();
            gig.ID              = gigId;
            gig.Name            = gigName;
            gig.Description     = gigDescription;
            gig.StartDate       = startDate;
            gig.EndDate         = endDate;
            gig.TicketPrice     = gigTicketPrice;
            gig.Acts.Add(act);

            Assert.That(gig.ID,
               Is.EqualTo(gigId));
            Assert.That(gig.Name,
                Is.EqualTo(gigName));
            Assert.That(gig.Description,
                Is.EqualTo(gigDescription));
            Assert.That(gig.StartDate,
                Is.EqualTo(startDate));
            Assert.That(gig.EndDate,
                Is.EqualTo(endDate));
            Assert.That(gig.TicketPrice,
                Is.EqualTo(gigTicketPrice));
            Assert.That(gig.Acts.Count,
                Is.EqualTo(1));
        }
示例#3
0
        private void AddActToGig(Gig gig, Artist artist, string name)
        {
            Act currentAct = new Act();
            currentAct.ID = Guid.NewGuid();
            currentAct.GigId = gig.ID;
            if (artist!=null)
            {
                currentAct.Name = artist.Name;
                currentAct.Artist = artist;
            }
            else
            {
                currentAct.Name = name;
            }

            gig.Acts.Add(currentAct);
        }