コード例 #1
0
 public void RemoveBasketForNullOwnerWillThrow(BasketManager sut)
 {
     // Fixture setup
     // Exercise system and verify outcome
     Assert.Throws<ArgumentNullException>(() =>
         sut.RemoveBasket(null));
     // Teardown
 }
コード例 #2
0
 public void RemoveBasketForNullOwnerWillThrow(BasketManager sut)
 {
     // Fixture setup
     // Exercise system and verify outcome
     Assert.Throws <ArgumentNullException>(() =>
                                           sut.RemoveBasket(null));
     // Teardown
 }
コード例 #3
0
 public void RemoveBasketWillRemoveBasketFromService([Frozen]Mock<IBasketService> basketServiceMock, string owner, BasketManager sut)
 {
     // Fixture setup
     // Exercise system
     sut.RemoveBasket(owner);
     // Verify outcome
     basketServiceMock.Verify(bs => bs.Empty(It.Is<IPrincipal>(p => p.Identity.Name == owner)));
     // Teardown
 }
コード例 #4
0
 public void RemoveBasketWillRemoveBasketFromService([Frozen] Mock <IBasketService> basketServiceMock, string owner, BasketManager sut)
 {
     // Fixture setup
     // Exercise system
     sut.RemoveBasket(owner);
     // Verify outcome
     basketServiceMock.Verify(bs => bs.Empty(It.Is <IPrincipal>(p => p.Identity.Name == owner)));
     // Teardown
 }
コード例 #5
0
ファイル: Apple.cs プロジェクト: PaulRuz/ApplePicker
    void LateUpdate()
    {
        Vector2 currentPosition = transform.position;

        if (currentPosition.y <= bottomY)
        {
            Destroy(gameObject);
            basketManager.RemoveBasket();
        }
    }