public void Setup() { _title = Helpers.Random; _randomUri = "http://" + Helpers.Random + ".com/"; _sutObject = new SlackMessageTestObject(); _sutObject.AddDefaultAttachment(); _result = _sutObject.Sut.Title(_title, _randomUri); }
public void Setup() { _testObject = new SlackMessageTestObject(); _testObject.AddDefaultAttachment(); _preText = Helpers.Random; _result = _testObject.Sut.Pretext(_preText); }
public void SetUp() { SutTestObject = new SlackMessageTestObject(); SutTestObject.AddDefaultAttachment(); }
public void Setup() { _title = Helpers.Random; _value = Helpers.Random; _short = true; _testObject = new SlackMessageTestObject(); _testObject.AddDefaultAttachment(); _result = _testObject.Sut.Field(_title, _value, _short); }
public void Setup() { _testObject = new SlackMessageTestObject(); _testObject.AddDefaultAttachment(); _fallBack = Helpers.Random; _result = _testObject.Sut.FallBack(_fallBack); }
public void Setup() { _testObject = new SlackMessageTestObject(); _testObject.AddDefaultAttachment(); _columcount = Helpers.RandomNumber(1, 4); _rowcount = Helpers.RandomNumber(1, 4); _columnNames = new List<string>(); _data = new Dictionary<string, IList<string>>(); testTable = new DataTable(); for(int i=0; i < _columcount; i++) { string name = Helpers.Random; _columnNames.Add(name); testTable.Columns.Add(name); _data.Add(name, new List<string>()); } for(int i=0; i < _rowcount; i++) { DataRow drow = testTable.NewRow(); foreach(DataColumn dcol in testTable.Columns) { var value = Helpers.Random; drow[dcol] = value; _data[dcol.ColumnName].Add(value); } testTable.Rows.Add(drow); } _result = _testObject.Sut.AddData(testTable); }
public void AddsFieldPerColumn() { _testObject = new SlackMessageTestObject(); _testObject.AddDefaultAttachment(); var initial = _testObject.DefaultAttachment.Fields.Count; _result = _testObject.Sut.AddData(testTable); Assert.AreEqual(initial + _columcount, _testObject.DefaultAttachment.Fields.Count, "Added " + (initial + _columcount).ToString() + " Fields"); }
public void SetsAuthorLinkToNullIfInvalidUrl() { var sutTestObject = new SlackMessageTestObject(); sutTestObject.Sut.AsAuthor(Helpers.Random, AuthorIcon, Helpers.Random); Assert.IsNull(sutTestObject.Sut.Author.Link); }