public void Friendship_Can_Serialize() { var friend = new Friendship(); var stringBuilder = new StringBuilder(); var writer = XmlWriter.Create(stringBuilder); var xmlSerializer = new XmlSerializer(typeof(Friendship)); xmlSerializer.Serialize(writer, friend); }