Exemple #1
0
        public void Constructor_ExpectedValues()
        {
            // Setup
            const string name = "Some name";

            // Call
            var data = new MapDataChild(name);

            // Assert
            Assert.IsInstanceOf <Observable>(data);
            Assert.AreEqual(name, data.Name);
            Assert.IsTrue(data.IsVisible);
        }
Exemple #2
0
        public void Name_SetName_ReturnsNewName()
        {
            // Setup
            const string name    = "Some name";
            const string newName = "Something";
            var          data    = new MapDataChild(name);

            // Precondition
            Assert.AreEqual(name, data.Name);

            // Call
            data.Name = newName;

            // Assert
            Assert.AreNotEqual(name, data.Name);
            Assert.AreEqual(newName, data.Name);
        }