AffiliateWith() public method

public AffiliateWith ( Establishment establishment ) : Affiliation
establishment UCosmic.Domain.Establishments.Establishment
return Affiliation
Esempio n. 1
0
            public void ReturnsExistingAffiliation_WhenAlreadyAffiliated()
            {
                var establishment = new Establishment();
                var affiliation = new Affiliation { Establishment = establishment };
                var person = new Person
                {
                    Affiliations = new List<Affiliation> { affiliation }
                };

                var result = person.AffiliateWith(establishment);

                result.ShouldEqual(affiliation);
            }
Esempio n. 2
0
            public void ReturnsExistingAffiliation_WhenAlreadyAffiliated()
            {
                var establishment = new Establishment();
                var affiliation   = new Affiliation {
                    Establishment = establishment
                };
                var person = new Person
                {
                    Affiliations = new List <Affiliation> {
                        affiliation
                    }
                };

                var result = person.AffiliateWith(establishment);

                result.ShouldEqual(affiliation);
            }