public void When_OwnerHasNotCurrentlyUsedDevice_then_CantPurchaseDevice() { DeviceOwner deviceOwner = DeviceOwner.WithoutPurchasedHistory(Guid.NewGuid(), new List <UsedDevice>()); PurchasedDevice purchasedDevice = _samePurchasedDeviceAsTheUsedOne; deviceOwner.Purchase(purchasedDevice, 0); Assert.That(deviceOwner.DidPurchase(purchasedDevice), Is.False); }
public void When_OwnerHasNotUsedDeviceForCertainPeriodOfTime_then_CantPurchaseDevice() { DeviceOwner deviceOwner = DeviceOwner.WithoutPurchasedHistory(Guid.NewGuid(), _usedDevices); PurchasedDevice purchasedDevice = _samePurchasedDeviceAsTheUsedOne; deviceOwner.Purchase(purchasedDevice, 1000); Assert.That(deviceOwner.DidPurchase(purchasedDevice), Is.False); }
public void When_OwnerPurchaseCurrentlyUsedDevice_then_PurchaseItOut() { DeviceOwner deviceOwner = DeviceOwner.WithoutPurchasedHistory(Guid.NewGuid(), _usedDevices); PurchasedDevice purchasedDevice = _samePurchasedDeviceAsTheUsedOne; deviceOwner.Purchase(purchasedDevice, 0); Assert.That(deviceOwner.DidPurchase(purchasedDevice), Is.True); }