コード例 #1
0
ファイル: RelationsTest.cs プロジェクト: sm-g/diagnosis
        public void App2Hr()
        {
            var app = new Appointment();
            var hr  = app.AddHealthRecord(d1);

            Assert.AreEqual(app, hr.Appointment);
            Assert.IsTrue(app.HealthRecords.Contains(hr));

            app.RemoveHealthRecord(hr);

            Assert.IsFalse(app.HealthRecords.Contains(hr));
        }
コード例 #2
0
ファイル: RelationsTest.cs プロジェクト: sm-g/diagnosis
        public void Doctor2Hr()
        {
            var app = new Appointment();
            var hr  = app.AddHealthRecord(d1);

            Assert.IsTrue(d1.HealthRecords.Contains(hr));

            var c   = new Course();
            var hr2 = c.AddHealthRecord(d1);

            Assert.IsTrue(d1.HealthRecords.Contains(hr2));

            app.RemoveHealthRecord(hr);
            c.RemoveHealthRecord(hr2);
            Assert.IsFalse(d1.HealthRecords.Contains(hr));
            Assert.IsFalse(d1.HealthRecords.Contains(hr2));
        }