Exemple #1
0
        public void PrepareImport_ValidateImportConfigs()
        {
            // Import a Dictionary view into a Dictionary area
            _controller.PrepareImport(_zipFile);
            Assert.IsNotNull(_controller.NewConfigToImport, "Dictionary configuration should have been prepared for import, since we requested to import the right kind of configuration (Dictionary into Dictionary area).");

            // Import a Dictionary view into a ReversalIndex area
            _reversalController.PrepareImport(_zipFile);
            Assert.IsNull(_reversalController.NewConfigToImport, "No configuration to import should have been prepared since the wrong type of configuration was requested to be imported (Dictionary into Reversal area).");

            // Import a Reversal view into a Dictionary area
            _controller.PrepareImport(_reversalZipFile);
            Assert.IsNull(_controller.NewConfigToImport, "No configuration to import should have been prepared since the wrong type of configuration was requested to be imported (Reversal into Dictionary area).");

            // Import a Reversal view into a ReversalIndex area
            _reversalController.PrepareImport(_reversalZipFile);
            Assert.IsNotNull(_reversalController.NewConfigToImport, "Reversal configuration should have been prepared for import, since we requested to import the right kind of configuration (Reversal into Reversal area).");
        }
Exemple #2
0
        public void PrepareImport_PreparedDataForImport()
        {
            // SUT
            _controller.PrepareImport(_zipFile);

            Assert.That(_controller.NewConfigToImport, Is.Not.Null, "Failed to create config object");
            Assert.That(_controller.NewConfigToImport.Label, Is.EqualTo(configLabel), "Failed to process data to be imported");
            Assert.That(_controller._originalConfigLabel, Is.EqualTo(configLabel),
                        "Failed to describe original label from data to import.");
            Assert.That(_controller.ImportHappened, Is.False, "Import hasn't actually happened yet, so don't claim it has");
        }