예제 #1
0
        public void GetClosedComplaint()
        {
            Complaint complaint = new Complaint()
            {
                ID = 1, Contents = "Test Complaint", Completed = true, Create = DateTime.Now
            };
            int count = ComplaintRepo.Complaints.Count;

            ComplaintRepo.AddComplaint(complaint);
            List <Complaint> found = ComplaintRepo.GetClosedComplaints();

            Assert.True(found.Count == ComplaintRepo.Complaints.Count);
            // Cleanup
            Context.Database.EnsureDeleted();
        }