public void MockDataTableFactoryShouldReturnData()
        {
            var sut = MockDataTableFactory.CreateDataTable();


            MockDataTableFactory.CheckDataTable(sut);
        }
Exemple #2
0
        public void MockDbDataAdapterShouldThrowArgumentNullExceptionIfFillMethodsArgumentsNull()
        {
            var sut = new MockDbDataAdapter(MockDataTableFactory.CreateDataTable());

            //Delegate - Rogzitem a muveletet<
            Action act = () => sut.Fill(null);

            act.Should().Throw <ArgumentNullException>();
        }
Exemple #3
0
        public void MockDbDataAdapterShouldReturnTable()
        {
            var sut     = new MockDbDataAdapter(MockDataTableFactory.CreateDataTable());
            var dataSet = new DataSet();

            //Delegate - Rogzitem a muveletet<
            sut.Fill(dataSet);

            dataSet.Tables.Should().HaveCount(1);
        }
Exemple #4
0
        public void AddressDbDataAdapterRepositoryShouldReturnMockData()
        {
            var adapter = new MockDbDataAdapter(MockDataTableFactory.CreateDataTable());
            var sut     = new AddressDbDataAdapterRepository(adapter);

            var list = sut.GetAddresses();

            list.Should().HaveCount(1, "Egy elemunk van a repoban")
            .And.Should().Equals(new Address {
                Email = GlobalStrings.TestEmailAddress
            });
        }