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()); }
/// <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; }
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"); }
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"); }
public void Update(Country entity) { }
public void InsertOrUpdate(Country country) { }
public void Insert(Country entity) { }
public void Delete(Country entity) { }