public static StoreInfoData Create(StoreNumber storeNumber) { return(new StoreInfoData { LocationId = new LocationId { StoreNumber = storeNumber.Store, SatelliteNumber = storeNumber.Satellite, IsRestricted = true }, Address = new Address { Address1 = $"{storeNumber}addr1", Address2 = $"{storeNumber}addr2", Address3 = $"{storeNumber}addr3", City = $"{storeNumber}city1", CountryCode = $"{storeNumber}us", CountryCode3 = $"{storeNumber}us3", PostalCode = $"{storeNumber}12345", StateProvCode = $"{storeNumber}ny" }, Geo = new Geo { CurrentUtcOffset = 5, Latitude = 34, Longitude = 67, TimeZoneId = $"{storeNumber}GMT" }, ListingNumber = 12, CateringUrl = $"{storeNumber}the catering", OrderingUrl = $"{storeNumber}the ordering" }); }
public static StoreInfo Create(StoreNumber storeNumber) => new StoreInfo { StoreNumber = storeNumber, Address1 = $"{storeNumber}addr1", Address2 = $"{storeNumber}addr2", Address3 = $"{storeNumber}addr3", CateringUrl = $"{storeNumber}the catering", City = $"{storeNumber}the city", CountryCode = $"{storeNumber}us", CountryCode3 = $"{storeNumber}usa", CurrentUtcOffset = 5, IsRestricted = true, Latitude = 12, Longitude = 16, OrderingUrl = $"{storeNumber}the ordering", PostalCode = $"{storeNumber}12345", State = $"{storeNumber}fl", TimeZoneId = $"{storeNumber}EST" };
/// <summary> /// Returns a <see cref="System.String" /> that represents this instance. /// </summary> /// <returns> /// A <see cref="System.String" /> that represents this instance. /// </returns> public override string ToString() { return(StoreNumber.ToString()); }
public void CanBeImplicitlyBuiltOutOfAString() { StoreNumber sn = "111111-1"; sn.Should().Be(new StoreNumber(111111, 1)); }
public void PreventFuturePersistence(StoreNumber storeNumber) => _cacheWithExpiration.Add(storeNumber.ToString(), _expirationMs);
public bool WasPersistedRecently(StoreNumber storeNumber) => _cacheWithExpiration.Contains(storeNumber.ToString());