Esempio n. 1
0
        public void ItShouldStoreTheFollowedUser()
        {
            //g
            var messages = new List<Message>();
            var userToFollowed = new Dictionary<string, List<string>> { {"Charlie", new List<string>()} };
            var command = new FollowCommand("Charlie", "Alice");

            //w
            command.ExecuteUsing(messages, userToFollowed);

            //t
            userToFollowed["Charlie"].Should().Contain("Alice");
        }
Esempio n. 2
0
        public void ItShouldCreateTheFollower_GivenWasMissing()
        {
            //g
            var messages = new List<Message>();
            var userToFollowed = new Dictionary<string, List<string>>();
            var command = new FollowCommand("Charlie", "Alice");

            //w
            command.ExecuteUsing(messages, userToFollowed);

            //t
            userToFollowed.Should().ContainKey("Charlie");
            userToFollowed["Charlie"].Should().Contain("Alice");
        }