コード例 #1
0
    protected override IEnumerator SetUp()
    {
        chatController = new ChatController_Mock();

        GameObject go = Object.Instantiate((GameObject)Resources.Load(UNREAD_NOTIFICATION_BADGE_RESOURCE_NAME));

        unreadNotificationBadge = go.GetComponent <UnreadNotificationBadge>();
        unreadNotificationBadge.Initialize(chatController, TEST_USER_ID);

        CommonScriptableObjects.lastReadChatMessages.Remove(TEST_USER_ID);
        CommonScriptableObjects.lastReadChatMessages.Remove(INVALID_TEST_USER_ID);

        Assert.AreEqual(0, unreadNotificationBadge.currentUnreadMessages, "There shouldn't be any unread notification after initialization");
        Assert.AreEqual(false, unreadNotificationBadge.notificationContainer.activeSelf, "Notificaton container should be deactivated");

        yield break;
    }