예제 #1
0
        public void Name_ShouldBeSetAndGottenCorrectly(string testName)
        {
            //Arrange && Act
            var city = new Models.Locations.City {
                Name = testName
            };

            //Assert
            Assert.AreEqual(testName, city.Name);
        }
예제 #2
0
        public void Id_ShouldBeSetAndGottenCorrectly(string testId)
        {
            //Arrange && Act
            var city = new Models.Locations.City {
                Id = Guid.Parse(testId)
            };

            //Assert
            Assert.AreEqual(testId, city.Id.ToString());
        }
예제 #3
0
        public void CountryId_ShouldBeSetAndGottenCorrectly()
        {
            //Arrange
            var testId = Guid.NewGuid();

            //Act
            var city = new Models.Locations.City {
                CountryId = testId
            };

            //Assert
            Assert.AreEqual(testId, city.CountryId);
        }
예제 #4
0
        public void Country_ShouldBeSetAndGottenCorrectly()
        {
            //Arrange
            var country = new Models.Locations.Country();

            //Act
            var city = new Models.Locations.City()
            {
                Country = country
            };

            //Assert
            Assert.AreSame(country, city.Country);
            Assert.AreEqual(country.Id, city.Country.Id);
        }