public void ReactCorrectlyToFriendApproved()
    {
        var id    = "test-id-1";
        var entry = TestHelpers_Friends.FakeAddFriend(friendsController, view, id);

        Assert.IsNotNull(entry);

        friendsController.RaiseUpdateFriendship(id, FriendshipAction.DELETED);
        entry = controller.view.friendsList.GetEntry(id) as FriendEntry;
        Assert.IsNull(entry);
    }
Esempio n. 2
0
    public static FriendEntry FakeAddFriend(FriendsController_Mock controller, FriendsHUDView hudView, string id, FriendshipAction action = FriendshipAction.APPROVED)
    {
        UserProfileModel model = new UserProfileModel()
        {
            userId = id,
            name   = id,
        };

        UserProfileController.i.AddUserProfileToCatalog(model);
        controller.RaiseUpdateFriendship(id, action);
        return(hudView.friendsList.GetEntry(id) as FriendEntry);
    }
Esempio n. 3
0
    public static IEnumerator FakeAddFriend(FriendsController_Mock controller, FriendsHUDView hudView, string id, FriendshipAction action = FriendshipAction.APPROVED)
    {
        UserProfileModel model = new UserProfileModel()
        {
            userId = id,
            name   = id,
        };

        UserProfileController.i.AddUserProfileToCatalog(model);
        controller.RaiseUpdateFriendship(id, action);
        yield return(new WaitUntil(() => hudView.friendsList.creationQueue.Count == 0));
    }