コード例 #1
0
        public void CancelLoadingCorrectly()
        {
            // Arrange
            bool loadingCanceled = false;

            builderInWorldLoadingView.OnCancelLoading += () => { loadingCanceled = true; };

            // Act
            builderInWorldLoadingView.CancelLoading(new DCLAction_Trigger());

            // Assert
            Assert.IsTrue(loadingCanceled, "loadingCanceled is false!");
        }
コード例 #2
0
        public void CancelLoadingCorrectly()
        {
            // Arrange
            builderInWorldLoadingView.gameObject.SetActive(true);
            bool loadingCanceled = false;

            builderInWorldLoadingView.OnCancelLoading += () => { loadingCanceled = true; };

            // Act
            builderInWorldLoadingView.CancelLoading();

            // Assert
            Assert.IsFalse(builderInWorldLoadingView.gameObject.activeSelf, "The view activeSelf property is true!");
            Assert.IsTrue(loadingCanceled, "loadingCanceled is false!");
        }