public void RemoveFromCurrencyTest() { _currencies.Set(_gold, 10f); var result = _currencies.Remove(_gold, 1f); Assert.IsNull(result.error); Assert.IsTrue(result.result); Assert.AreEqual(9f, _currencies.GetAmount(_gold)); }
public void Removing_Null_Throws_ArgumentNullException() { var sut = new CurrencyCollection { EUR }; Action action = () => sut.Remove(null); action.Should().Throw <ArgumentNullException>(); }
public void Removing_A_Currency_Does_Not_Depend_On_Pointer_Reference() { var sut = new CurrencyCollection { new Currency("AED") }; sut.Remove(new Currency("AED")); sut.Count.Should().Be(0); }
public void Removing_A_Currency_That_Was_Not_Registered_Does_Not_Do_Anything() { var sut = new CurrencyCollection { EUR }; sut.Remove(new Currency("AED")); sut.Count.Should().Be(1); }
private void RemoveCurrencyFromCollection() { CurrencyCollection.Remove(SelectedCurrencyItem); _MyMainWindow.SelectFirstItem(); /// Selects first item after removing _CurrencyDeleteView.Close(); _jsonDataService.SaveCurrencyData(CurrencyCollection); /// Saves currency data to the hard drive if (CurrencyCollection.Count == 0) { IsRemoveBtnEnabled = false; } }
public void Remove_Currency_From_List() { var sut = new CurrencyCollection { EUR }; sut.Count.Should().Be(1); sut.Remove(EUR); sut.Count.Should().Be(0); }