Example #1
0
        public void CountriesDropDownList_Default_ListOfAllCountries()
        {
            //Arrange
            LocationController controller = new LocationController(mock.Object);

            //Act
            var result   = controller.CountriesDropDownList();
            var expected = result.ToArray();

            //Asset
            Assert.IsInstanceOf(typeof(SelectList), result);
            Assert.AreEqual(5, expected.Length);
            Assert.AreEqual("Belarus", expected[0].Text);
            Assert.AreEqual("Poland", expected[1].Text);
            Assert.AreEqual("Sweden", expected[2].Text);
            Assert.AreEqual("Ukraine", expected[3].Text);
            Assert.AreEqual("Zimbabve", expected[4].Text);
        }