Exemplo n.º 1
0
        public void NullToPath()
        {
            string expectedFromPath = "/SSRSMigrate_AW_Tests/Reports";
            bool expectedSuccess = true;
            string[] expectedErrors = null;

            ArgumentException ex = Assert.Throws<ArgumentException>(
                delegate
                {
                    ExportStatus actualStatus = new ExportStatus(null, expectedFromPath, expectedErrors, expectedSuccess);
                });

            Assert.That(ex.Message, Is.EqualTo("pathTo"));
        }
Exemplo n.º 2
0
        public void EmptyFromPath()
        {
            string expectedToPath = "C:\\temp\\SSRSMigrate_Tests\\Reports";
            bool expectedSuccess = true;
            string[] expectedErrors = null;

            ArgumentException ex = Assert.Throws<ArgumentException>(
                delegate
                {
                    ExportStatus actualStatus = new ExportStatus(expectedToPath, "", expectedErrors, expectedSuccess);
                });

            Assert.That(ex.Message, Is.EqualTo("pathFrom"));
        }
Exemplo n.º 3
0
        public void WithErrors()
        {
            string expectedToPath = "C:\\temp\\SSRSMigrate_AW_Tests\\Reports";
            string expectedFromPath = "/SSRSMigrate_AW_Tests/Reports";
            bool expectedSuccess = false;
            string[] expectedErrors = new string[] { "Permission denied." };

            ExportStatus actualStatus = new ExportStatus(expectedToPath, expectedFromPath, expectedErrors, expectedSuccess);

            Assert.AreEqual(expectedToPath, actualStatus.ToPath);
            Assert.AreEqual(expectedFromPath, actualStatus.FromPath);
            Assert.AreEqual(expectedErrors, actualStatus.Errors);
            Assert.AreEqual(expectedSuccess, actualStatus.Success);
        }
Exemplo n.º 4
0
        public void Succeed()
        {
            string expectedToPath = "C:\\temp\\SSRSMigrate_AW_Tests\\Reports";
            string expectedFromPath = "/SSRSMigrate_AW_Tests/Reports";
            bool expectedSuccess = true;
            string[] expectedErrors = null;

            ExportStatus actualStatus = new ExportStatus(expectedToPath, expectedFromPath, expectedErrors, expectedSuccess);

            Assert.AreEqual(expectedToPath, actualStatus.ToPath);
            Assert.AreEqual(expectedFromPath, actualStatus.FromPath);
            Assert.AreEqual(expectedErrors, actualStatus.Errors);
            Assert.AreEqual(expectedSuccess, actualStatus.Success);
        }