コード例 #1
0
        public void Creator_SetsZipCorrectly()
        {
            // arrange
            var model = new CityModel
            {
                Id   = 2,
                Name = "test"
            };

            // act
            var viewModel = CityItemViewModel.Create(model);

            // assert
            Assert.AreEqual(model.Name, viewModel.Name);
        }
コード例 #2
0
 public void Creator_ThrowsArgumentNullException()
 {
     // arrange act assert
     Assert.Throws <ArgumentNullException>(() => CityItemViewModel.Create(null));
 }
コード例 #3
0
 public void Creator_DoesNotThrowException()
 {
     // arrange act assert
     Assert.DoesNotThrow(() => CityItemViewModel.Create(new CityModel()));
 }