示例#1
0
        public void MockDbDataAdapterShouldThrowArgumentNullExceptionIfArgumentsNull()
        {
            MockDbDataAdapter sut;

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

            act.Should().Throw <ArgumentNullException>();
        }
示例#2
0
        public void MockDbDataAdapterShouldThrowArgumentNullExceptionIfFillMethodsArgumentsNull()
        {
            var sut = new MockDbDataAdapter(MockDataTableFactory.CreateDataTable());

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

            act.Should().Throw <ArgumentNullException>();
        }
示例#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);
        }
示例#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
            });
        }