Example #1
0
        public void RussellCanShareAThoughtWithMike()
        {
            Cloud   cloud   = MikeSharesCloudWithRussell();
            Thought thought = cloud.NewThought();

            cloud.CentralThought = thought;
            thought.Text         = "Lunch suggestions";

            Synchronize();

            Cloud   sharedCloud = _russellsIdentity.SharedClouds.Single();
            Thought newThought  = sharedCloud.NewThought();

            newThought.Text = "Mi Pueblo";
            Thought centralThought = sharedCloud.CentralThought;

            centralThought.LinkTo(newThought);

            Synchronize();

            IEnumerable <Thought> suggestions = thought.Neighbors.Where(n => n != thought);

            Assert.AreEqual(1, suggestions.Count());
            string suggestionText = suggestions.Single().Text;

            Assert.AreEqual("Mi Pueblo", suggestionText);
        }