public void Rows_ShouldReturnOneRow_WhenOneRowIsAdded() { var sut = new global::TableLogger.TableLogger("Id"); sut.AddRow("1"); sut.Rows.ShouldNotBeEmpty(); }
public void WriteTable_ShouldCallWriteLineOnLogProvider_WhenThereIsARowDefined() { var logProviderMock = new Mock <ILogProvider>(); var sut = new global::TableLogger.TableLogger("Id"); sut.AddLogProvider(logProviderMock.Object); sut.AddRow("1"); sut.WriteTable(); logProviderMock.Verify(x => x.WriteLine(It.IsAny <string>()), Times.Once); }
public void Columns_ShouldReturnOneColumn_WhenOneColumnIsSpecifiedInConstructor() { var sut = new global::TableLogger.TableLogger("Id"); sut.Columns.ShouldNotBeEmpty(); }
public void AddRowData_ShouldThrowException_WhenNoDataProvided() { var sut = new global::TableLogger.TableLogger(); Should.Throw <ArgumentException>(() => sut.AddRow()); }