Example #1
0
        public void ShouldRespondThatUserNotFoundWhenConnectorDoesNotExist()
        {
            //GIVEN
            var user2   = Root.Any.Instance <UserDto>();
            var context = new ApplicationLogicDriver();

            context.Start();

            context.UsersDatabaseContains(user2);

            //WHEN
            context.MakeAConnectionBetween(Root.Any.String(), user2.Id);

            //THEN
            context.DatabaseShouldNotBeUpdated();
            context.ResponseShouldSayUserNotFound();
        }
Example #2
0
        public void ShouldRespondThatOtherUserIdIsInvalidWhenConnectorIdIsRejectedByDatabase()
        {
            //GIVEN
            var user1   = Root.Any.Instance <UserDto>();
            var context = new ApplicationLogicDriver();

            context.Start();
            var user2Id = Root.Any.String();

            context.UsersDatabaseContains(user1);
            context.UsersDatabaseRejects(user2Id);

            //WHEN
            context.MakeAConnectionBetween(user1.Id, user2Id);

            //THEN
            context.DatabaseShouldNotBeUpdated();
            context.ResponseShouldSayOtherUserIdInvalid();
        }