public void GetTotalProvidersTest()
 {
     ProviderDAO target = new ProviderDAO(connnetion);
     long expected = 1;
     long actual;
     actual = target.GetTotalProviders();
     Assert.AreEqual(expected, actual);
 }
 public void GetProvidersTest()
 {
     ProviderDAO target = new ProviderDAO(connnetion);
     Nullable<int> page = new Nullable<int>(1);
     Nullable<int> recordsPerPage = new Nullable<int>(1);
     Provider expected = new Provider
     {
         ID = 1,
         Name = "Instituto Nacional de Estatística",
         NameAbbr = "INE",
         ServiceURL = "http://localhost:42136/INEStatisticsProvider.svc",
         URL = "http://www.ine.pt"
     };
     IEnumerable<Provider> actual;
     actual = target.GetProviders(page, recordsPerPage);
     Assert.AreEqual(1, actual.Count());
     Assert.AreEqual(expected, actual.ElementAt(0));
 }
Exemple #3
0
        static Provider addProvider(DbConnection conn)
        {
            Console.WriteLine(":::::::::: Adding provider :::::::::");

            Provider p = new Provider
            {
                Name = "Instituto Nacional de Estatística",
                NameAbbr = "INE",
                ServiceURL = "http://localhost:42136/INEStatisticsProvider.svc",
                URL = "http://www.ine.pt"
            };

            ProviderDAO provider = new ProviderDAO(conn);
            p.ID = provider.AddProvider(p);

            return p;
        }
 public void ProviderDAOConstructorTest()
 {
     ProviderDAO target = new ProviderDAO(connnetion);
     Assert.AreNotEqual(target, null);
 }