Exemplo n.º 1
0
        public void ShouldSmuggleOnlyTransformers()
        {
            var destination = new DatabaseSmugglerCountingDestination();
            var smuggler    = new DatabaseSmuggler(new DatabaseSmugglerOptions
            {
                OperateOnTypes = DatabaseItemType.Transformers
            }, new DatabaseSmugglerFileSource(_path), destination);

            smuggler.Execute();

            Assert.Equal(0, destination.WroteDocuments);
            Assert.Equal(0, destination.WroteDocumentDeletions);
            Assert.Equal(0, destination.WroteIdentities);
            Assert.Equal(0, destination.WroteIndexes);
            Assert.Equal(1, destination.WroteTransformers);
        }
Exemplo n.º 2
0
        public void ShouldSmuggleOnlyTransformers()
        {
            using (var store = NewRemoteDocumentStore())
            {
                DeployNorthwind(store);

                var destination = new DatabaseSmugglerCountingDestination();
                var smuggler    = new DatabaseSmuggler(new DatabaseSmugglerOptions
                {
                    OperateOnTypes = DatabaseItemType.Transformers
                }, new DatabaseSmugglerRemoteSource(store), destination);
                smuggler.Execute();

                Assert.Equal(0, destination.WroteDocuments);
                Assert.Equal(0, destination.WroteDocumentDeletions);
                Assert.Equal(0, destination.WroteIdentities);
                Assert.Equal(0, destination.WroteIndexes);
                Assert.Equal(1, destination.WroteTransformers);
            }
        }
Exemplo n.º 3
0
        public void ShouldSmuggleOnlyTransformers()
        {
            using (var store = NewRemoteDocumentStore())
            {
                var database = servers[0].Options.DatabaseLandlord.GetResourceInternal(store.DefaultDatabase).Result;

                DeployNorthwind(store);

                var destination = new DatabaseSmugglerCountingDestination();
                var smuggler    = new DatabaseSmuggler(new DatabaseSmugglerOptions
                {
                    OperateOnTypes = DatabaseItemType.Transformers
                }, new DatabaseSmugglerEmbeddedSource(database), destination);
                smuggler.Execute();

                Assert.Equal(0, destination.WroteDocuments);
                Assert.Equal(0, destination.WroteDocumentDeletions);
                Assert.Equal(0, destination.WroteIdentities);
                Assert.Equal(0, destination.WroteIndexes);
                Assert.Equal(1, destination.WroteTransformers);
            }
        }