public void Test_CountryExtension_FlagImage()
        {
            var country = new Country { Title = "United States", Code = "us" };
            var flag = country.FlagImage(this.Context);

            Assert.AreEqual("<img alt=\"United States\" src=\"/images/icons/us.gif\" />", flag.ToString());
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CountryDelete"/> class.
        /// </summary>
        /// <param name="country">The country.</param>
        public CountryDelete(Country country)
        {
            if (country == null)
            {
                throw new ArgumentNullException("country");
            }

            this.Id = country.Id;
            this.Title = country.Title;
        }
Example #3
0
        public void Test_CountryService_InsertOrUpdate()
        {
            var service = this.CountryService;
            var country = new Country { Title = "test3" };

            service.InsertOrUpdate(country);

            Assert.AreEqual(2, country.Id, "Id");
            Assert.AreEqual("test3", country.Title, "Title");
        }
Example #4
0
        public void Test_CountryService_Insert()
        {
            var country = new Country
            {
                Title = "Test 123"
            };

            this.CountryService.Insert(country);

            Assert.AreEqual(2, country.Id, "Id");
            Assert.AreEqual("test-123", country.Slug, "Slug");
        }
        public void Test_CountryCreateOrUpdate_ValueToModel()
        {
            var value = new CountryCreateOrUpdate
            {
                Title = "test",
                Code = "test2"
            };

            var country = new Country();

            value.ValueToModel(country);

            Assert.AreEqual("test", country.Title, "Title");
            Assert.AreEqual("test2", country.Code, "Code");
        }
Example #6
0
 public void Update(Country entity)
 {
 }
Example #7
0
 public void InsertOrUpdate(Country country)
 {
 }
Example #8
0
 public void Insert(Country entity)
 {
 }
Example #9
0
 public void Delete(Country entity)
 {
 }