public void MockDataTableFactoryShouldReturnData() { //Arrange //Act var sut = MockDataTableFactory.GetCreateDataTable();//sut: System Under Test //Assert MockDataTableFactory.CheckDataTable(sut); }
public void MockDataTableFactorySholdReturnData() { //Arrange //Act var sut = MockDataTableFactory.GetCreateDataTable(); //Assert MockDataTableFactory.CheckDataTable(sut); }
public void MockDbDataAdapterRepositoryShouldThrowExceptionIfFillArgumentNull() { //Arrange var sut = new MockDbDataAdapter(MockDataTableFactory.GetCreateDataTable());//sut: System Under Test //Act Action todo = () => sut.Fill(null); //Assert todo.ShouldThrow <ArgumentNullException>(); }
public void MockDbDataAdapterRepositoryShouldReturnOneTable() { //Arrange var sut = new MockDbDataAdapter(MockDataTableFactory.GetCreateDataTable());//sut: System Under Test var dataSet = new DataSet(); //Act sut.Fill(dataSet); //Assert dataSet.Tables.Should().HaveCount(1); }
public void AddressDbDataAdapterRepositoryShouldReturnMockData() { //Arrange var adapter = new MockDbDataAdapter(MockDataTableFactory.GetCreateDataTable()); var sut = new AddressDbDataAdapterRepository(adapter); //Act var list = sut.GetAddresses(); //Assert list.Should().HaveCount(1, "mivel egy elemet küldtünk a repoba") //.And //.Should().Equals(new Address { EMail = GlobalStrings.TesztEmailAddress }) ; }
public void MockDbDataAdapterRepositoryShouldReturnData() { //Arrange var sut = new MockDbDataAdapter(MockDataTableFactory.GetCreateDataTable());//sut: System Under Test var dataSet = new DataSet(); //Act sut.Fill(dataSet); //Assert dataSet.Tables.Should().HaveCount(1, "Egy tablaval kellett volna visszaterni"); var table = dataSet.Tables[0]; MockDataTableFactory.CheckDataTable(table); }
public void MockDbDataAdapterShouldReturnData() { //Arrange var sut = new MockDbDataAdapter(MockDataTableFactory.GetCreateDataTable()); var dataSet = new DataSet(); //Act sut.Fill(dataSet); //Assert dataSet.Tables.Should().HaveCount(1, "Mivel egy táblával kell visszatérni"); var table = dataSet.Tables[0]; MockDataTableFactory.CheckDataTable(table); }