ToString() 공개 메소드

public ToString ( ) : string
리턴 string
예제 #1
0
            public void ReturnsFriendlyInfo()
            {
                var entity = new Affiliation
                {
                    Person = new Person
                    {
                        DisplayName = "display name",
                    },
                    Establishment = new Establishment
                    {
                        OfficialName = "official name",
                    },
                };

                var result = entity.ToString();

                result.ShouldEqual(string.Format("{0} - {1}",
                                                 entity.Person.DisplayName, entity.Establishment.OfficialName));
            }
예제 #2
0
            public void ReturnsFriendlyInfo()
            {
                var entity = new Affiliation
                {
                    Person = new Person
                    {
                        DisplayName = "display name",
                    },
                    Establishment = new Establishment
                    {
                        OfficialName = "official name",
                    },
                };

                var result = entity.ToString();

                result.ShouldEqual(string.Format("{0} - {1}",
                    entity.Person.DisplayName, entity.Establishment.OfficialName));
            }