public void DeployPackageDoesNotExist() { // Arrange var packageDeployer = new PackageDeployer(_console); packageDeployer.UseTargetServer("localhost"); packageDeployer.UseWindowsAuthentication(); // Act Should.Throw<ArgumentException>(() => packageDeployer.Deploy(new FileInfo("does-not-exist.dacpac"), "TestDatabase")); }
public void UseTargetServerWithoutLoadPackage() { // Arrange using var packageDeployer = new PackageDeployer(_console); var packagePath = BuildSimpleModel(); // Act Should.Throw <InvalidOperationException>(() => packageDeployer.UseTargetServer("localhost")); // Assert packageDeployer.ConnectionStringBuilder.DataSource.ShouldBeEmpty(); }
public void UseTargetServer() { // Arrange var packageDeployer = new PackageDeployer(_console); // Act packageDeployer.UseTargetServer("localhost"); // Assert packageDeployer.ConnectionStringBuilder.DataSource.ShouldNotBeNull(); packageDeployer.ConnectionStringBuilder.DataSource.ShouldBe("localhost"); }
public void UseTargetServer() { // Arrange using var packageDeployer = new PackageDeployer(_console); var packagePath = BuildSimpleModel(); // Act packageDeployer.LoadPackage(packagePath); packageDeployer.UseTargetServer("localhost"); // Assert packageDeployer.ConnectionStringBuilder.DataSource.ShouldNotBeNull(); packageDeployer.ConnectionStringBuilder.DataSource.ShouldBe("localhost"); }