Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using DictionaryWorkshop.Implementation;
- using DictionaryWorkshop.Implementation.Contracts;
- using DictionaryWorkshop.Models;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- namespace DictionaryWorkshop.Tests
- {
- [TestMethod]
- public void Remove_ExistingElement_ShouldWorkCorrectly()
- {
- // Arrange
- MyDictionary<string, double> dictionary = new MyDictionary<string, double>
- { { "Vasko", 12.5 }, { "Maria", 99.9 } };
- // Assert
- Assert.AreEqual(2, dictionary);
- // Act
- bool removed = dictionary.Remove("Vasko");
- // Assert
- Assert.IsTrue(removed);
- Assert.AreEqual(1, dictionary.Count);
- }
- }
Add Comment
Please, Sign In to add comment