示例#1
0
        public void ReelsController_ShouldCallGetReelByIdMethod_AndReturnResultById()
        {
            _mockService.Setup(x => x.GetReelById(10)).Returns(new Reel {
                ReelId = 10
            });
            _reelsController             = new ReelController();
            _reelsController.MockService = _mockService.Object;

            var result = _reelsController.GetReelById(10);

            _mockService.Verify(m => m.GetReelById(10), Times.Once);
            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(Reel));
        }
 ReelController reelController;//Reelcontrollerの宣言
 private void Awake()
 {
     reelController = GameObject.Find("ReelController").GetComponent <ReelController>();//Reelcontrollerの取得
 }
示例#3
0
 public void TestInitialize()
 {
     _mockService                 = new Mock <IReelService>();
     _reelsController             = new ReelController();
     _reelsController.MockService = _mockService.Object;
 }
示例#4
0
 void Awake()
 {
     _instance = this;
 }