Esempio n. 1
0
        public void throws_business_exception_when_removing_primary_specialty()
        {
            var subject = new Provider() { Id = 1 };
            var firstSpecialty = new Specialty() { Id = 1 };
            var secondSpecialty = new Specialty() { Id = 2 };
            subject.AddSpecialty(firstSpecialty);
            subject.AddSpecialty(secondSpecialty);

            subject.RemoveSpecialty(firstSpecialty);
        }
Esempio n. 2
0
        public void can_remove_specialty()
        {
            var subject = new Provider() { Id = 1 };
            var firstSpecialty = new Specialty() { Id = 1 };
            var secondSpecialty = new Specialty() { Id = 2 };
            subject.AddSpecialty(firstSpecialty);
            subject.AddSpecialty(secondSpecialty);

            var removed = subject.RemoveSpecialty(secondSpecialty);

            Assert.AreEqual(secondSpecialty, removed.Specialty);
            Assert.IsTrue(subject.ProviderSpecialties.Count == 1);
        }