public void ShouldThrowArgumentNullExceptionWhenPropertyIsNull() { var table = new TableMetaData <TestEntity>(); GWT.Given("constructor test") .When(x => new ColumnMetaData(table: table, property: null)) .Then <ArgumentNullException>().ShouldBeThrown().ForParameter("property"); }
public void ShouldThrowArgumentNullExceptionWhenLanguageIsNull() { var connection = new FakeDbConnection(); GWT.Given("testing constructor") .When(x => new Database <IDbConnection, IDbLanguage>(connection: connection, language: null)) .Then <ArgumentNullException>().ShouldBeThrown().ForParameter("language"); }
public void ShouldThrowArgumentNullExceptionWhenRowIsNull() { var mockProperty = (new Mock <PropertyInfo>()).Object; GWT.Given("constructor test") .When(x => new ColumnMetaData(table: null, property: mockProperty)) .Then <ArgumentNullException>().ShouldBeThrown().ForParameter("table"); }
public void ShouldThrowArgumentNullExceptionWhenTableIsNull() { var connection = new FakeDbConnection(openConnection: true); var language = new FakeDbLanguage(); TableMetaData nullTable = null; GWT.Given(new Database <IDbConnection, IDbLanguage>(connection, language)) .When(d => d.CreateTable(nullTable)) .Then <ArgumentNullException>().ShouldBeThrown().ForParameter("table"); }
public void ShouldThrowArgumentNullExceptionWhenTableIsNull() { var connection = new FakeDbConnection(openConnection: true); var language = new FakeDbLanguage(); var row = new TestEntity(); GWT.Given(new Database <IDbConnection, IDbLanguage>(connection, language)) .When(d => d.Insert(row: row, table: null)) .Then <ArgumentNullException>().ShouldBeThrown().ForParameter("table"); }
public void ShouldThrowArgumentNullExceptionWhenRowIsNull() { var connection = new FakeDbConnection(openConnection: true); var language = new FakeDbLanguage(); var table = new TableMetaData <TestEntity>(); TestEntity nullRow = null; GWT.Given(new Database <IDbConnection, IDbLanguage>(connection, language)) .When(d => d.Insert(row: nullRow)) .Then <ArgumentNullException>().ShouldBeThrown().ForParameter("row"); }
public void ShouldThrowArgumentNullExceptionWhenRowTypeIsNull() { GWT.Given("testing static method") .When(x => TableMetaData.GetTable(rowType: null)) .Then <ArgumentNullException>().ShouldBeThrown().ForParameter("rowType"); }
public void ShouldThrowArgumentNullExceptionWhenRowTypeIsNull() { GWT.Given("testing constructor") .When(x => new TableMetaData(rowType: null)) .Then <ArgumentNullException>().ShouldBeThrown().ForParameter("rowType"); }