public void Create() { var cache = A.Fake<ICache>(); var settings = A.Fake<IDictionary<string, string>>(); var obj = new CustomStringProvider(cache, settings); Assert.IsNotNull(obj); }
public void GetTheEmtyValuesCollection() { var cache = A.Fake<ICache>(); var settings = new Dictionary<string, string> { }; var obj = new CustomStringProvider(cache, settings); var result = obj.GetAll(); Assert.False(result.Any()); }
public void Get() { var cache = A.Fake<ICache>(); var settings = new Dictionary<string, string> { }; var obj = new CustomStringProvider(cache, settings); var result = obj.GetAll(); var i = 0; foreach (var t in result) { if (i++ == 9) break; Assert.True((string)t[0] == string.Empty); } }
public void Get() { var cache = A.Fake<ICache>(); var array = new[] { "1", "2", "3" }; var data = string.Join(Constants.ValuesSettingsSplitter.ToString(), array); var settings = new Dictionary<string, string> { { Keys.Values, data } }; var obj = new CustomStringProvider(cache, settings); var result = obj.GetAll(); var i = 0; foreach (var t in result) { if (i++ == 9) break; Assert.True((string)t[0] == array[(i - 1) % 3]); } }