public void TestBuildFileMigratorSuccessful()
        {
            ClientContext clientContext = new ClientContext("http://blub");

            FileMigrationBuilder builder = FileMigrationBuilder.GetNewFileMigrationBuilder();

            builder.WithTargetClientContext(clientContext);
            builder.WithSourceClientContext(clientContext);
            builder.WithBandwith(10);
            builder.WithServiceAddress(new Uri("http://address"));

            SharePoint2010And2013Migrator migrator = builder.CreateMigrator();

            Assert.IsNotNull(migrator);
            Assert.IsTrue(typeof(SharePoint2010And2013Migrator) == migrator.GetType());
        }
        public void TestBuildfileMigratorWithoutServiceAddress()
        {
            ClientContext clientContext = new ClientContext("http://blub");

            FileMigrationBuilder builder = FileMigrationBuilder.GetNewFileMigrationBuilder();

            builder.WithTargetClientContext(clientContext);
            builder.WithSourceClientContext(clientContext);
            builder.WithBandwith(10);

            try
            {
                SharePoint2010And2013Migrator migrator = builder.CreateMigrator();
                Assert.Fail("Expected FileMigrationException");
            }
            catch (ValidationException)
            {
                // ok
            }
        }