public void MockDataTableFactoryShouldReturnData()
        {
            //Arrange
            //Act
            var sut = MockDataTableFactory.GetCreateDataTable();//sut: System Under Test

            //Assert
            MockDataTableFactory.CheckDataTable(sut);
        }
예제 #2
0
        public void MockDataTableFactorySholdReturnData()
        {
            //Arrange
            //Act
            var sut = MockDataTableFactory.GetCreateDataTable();

            //Assert
            MockDataTableFactory.CheckDataTable(sut);
        }
예제 #3
0
        public void MockDbDataAdapterRepositoryShouldThrowExceptionIfFillArgumentNull()
        {
            //Arrange
            var sut = new MockDbDataAdapter(MockDataTableFactory.GetCreateDataTable());//sut: System Under Test

            //Act
            Action todo = () => sut.Fill(null);

            //Assert
            todo.ShouldThrow <ArgumentNullException>();
        }
예제 #4
0
        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 })
            ;
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }