コード例 #1
0
        public void DeleteParty()
        {
            string          testName   = "my new event";
            DateTime        testDate   = new DateTime(2012, 3, 6, 11, 3, 5);
            PartyController controller = new PartyController();

            int newId = controller.CreateParty(new Party
            {
                Name = testName,
                Date = testDate
            });

            controller.CancelParty(newId);

            Party party = controller.GetParty(newId);

            Assert.AreEqual(party.Id, newId);
            Assert.AreEqual(party.Name, testName);
            Assert.AreEqual(party.Date, testDate);
            Assert.AreEqual(party.Cancelled, Cancelled.Yes);
        }