public void WillClone() { // Arrange var mockGame = new Mock<Game>(); var map = new Map(mockGame.Object, mockGame.Object.Countries); var countryA = new Domain.Games.Country("A", 1); map.Countries.Add(countryA); // Act var clone = map.Clone(); countryA.Units = 42; // Assert Assert.AreEqual(1, clone.Countries.Count); var clonedCountryA = clone.Countries.First(); Assert.AreNotEqual(42, clonedCountryA.Units); }
public void WillClone() { // Arrange var mockGame = new Mock <Game>(); var map = new Map(mockGame.Object, mockGame.Object.Countries); var countryA = new Domain.Games.Country("A", 1); map.Countries.Add(countryA); // Act var clone = map.Clone(); countryA.Units = 42; // Assert Assert.AreEqual(1, clone.Countries.Count); var clonedCountryA = clone.Countries.First(); Assert.AreNotEqual(42, clonedCountryA.Units); }