Ejemplo n.º 1
0
        public void CheckFileExists_WithPath_AddsToPath()
        {
            const string path = "diretory/to/check/exists";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckFileExists(path);

            Assert.That(dobermanConfiguration.Paths.Contains(path), Is.True);
        }
Ejemplo n.º 2
0
        public void CheckEmail_WithNoEnableSsl_ShouldSetSslToFalse()
        {
            const string host = "mail.host.com";
            const int port = 445;

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckEmail(host, port);

            Assert.That(dobermanConfiguration.SmtpSettings[0].Ssl, Is.False);
        }
Ejemplo n.º 3
0
        public void CheckEmail_ValidHostAndPort_ShouldAddToSmtpSettings()
        {
            const string host = "mail.host.com";
            const int port = 445;

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckEmail(host, port);

            Assert.That(dobermanConfiguration.SmtpSettings[0].Host, Is.EqualTo(host));
            Assert.That(dobermanConfiguration.SmtpSettings[0].Port, Is.EqualTo(port));
        }
Ejemplo n.º 4
0
 public DobermanPage()
 {
     Configuration = new DobermanConfiguration(new ConfigurationProvider());
 }
Ejemplo n.º 5
0
 public BaseDobermanController()
 {
     Configuration = new DobermanConfiguration(new ConfigurationProvider());
 }
Ejemplo n.º 6
0
        public void CheckFileSave_WithDirectory_SetsHasDirectoriesToSaveToTrue()
        {
            const string directory = "diretory/to/save/to";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckFileSave(directory);

            Assert.That(dobermanConfiguration.HasDirectoriesToSave, Is.True);
        }
Ejemplo n.º 7
0
        public void CheckFileSave_WithDirectory_AddsToDirectories()
        {
            const string directory = "diretory/to/save/to";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckFileSave(directory);

            Assert.That(dobermanConfiguration.Directories.Contains(directory), Is.True);
        }
Ejemplo n.º 8
0
        public void CheckSql_WithConnectionString_SetsSqlServerConnectionString()
        {
            var connectionString = @"Data Source=.\SQLEXPRESS;Integrated Security=True;database=DobermanTest";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckSql(connectionString);

            Assert.That(dobermanConfiguration.SqlConnectionStrings.Contains(connectionString), Is.True);
        }
Ejemplo n.º 9
0
        public void CheckPageLoad_WithUri_SetsHasPagesToLoadToTrue()
        {
            Uri url = new Uri("http://www.google.co.uk/");

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckPageLoad(url);

            Assert.That(dobermanConfiguration.HasPagesToLoad, Is.True);
        }
Ejemplo n.º 10
0
        public void CheckPageLoad_WithUrl_AddsUrlToPages()
        {
            const string url = "www.google.co.uk";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckPageLoad(url);

            Assert.That(dobermanConfiguration.Pages.Contains(url), Is.True);
        }
Ejemplo n.º 11
0
        public void CheckPageLoad_WithUri_AddsUrlFromUriToPages()
        {
            Uri url = new Uri("http://www.google.co.uk/testing/a/page/");
            const string expectedUrl = "http://www.google.co.uk";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckPageLoad(url);

            Assert.That(dobermanConfiguration.Pages.Contains(expectedUrl), Is.True);
        }
Ejemplo n.º 12
0
        public void CheckPageLoad_SetsHasPagesToLoadToTrue()
        {
            const string Url = "www.google.co.uk";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckPageLoad(Url);

            Assert.That(dobermanConfiguration.HasPagesToLoad, Is.True);
        }
Ejemplo n.º 13
0
        public void CheckMongo_WithConnectionString_HasMongoConnectionStringsToTrue()
        {
            var connectionString = @"mongodb://localhost/doberman-test";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckMongo(connectionString);

            Assert.That(dobermanConfiguration.HasMongoConnectionStrings, Is.True);
        }
Ejemplo n.º 14
0
        public void CheckMongo_WithConnectionString_AddsConnectionStringToMongoConnectionStrings()
        {
            var connectionString = @"mongodb://localhost/doberman-test";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckMongo(connectionString);

            Assert.That(dobermanConfiguration.MongoConnectionStrings.Contains(connectionString), Is.True);
        }
Ejemplo n.º 15
0
        public void CheckFileSave_WithPath_SetsHasPathsToExistToTrue()
        {
            const string path = "diretory/to/check/exists";

            var dobermanConfiguration = new DobermanConfiguration();
            dobermanConfiguration.CheckFileExists(path);

            Assert.That(dobermanConfiguration.HasPathsToExist, Is.True);
        }