public void ShouldNotSerializeSqoopJobName() { var sqoopJob = new SqoopJobCreateParameters(); sqoopJob.Command = "show tables"; var payloadConverter = new PayloadConverterBase(); var payload = payloadConverter.SerializeSqoopRequest("hadoop", sqoopJob); Assert.IsFalse((payload.Contains(WebHCatConstants.DefineJobName))); }
public void CanSerializeValidSqoopJobRequest_File() { var sqoopJob = new SqoopJobCreateParameters() { File = "file.sqoop" }; var payloadConverter = new PayloadConverterBase(); var payload = payloadConverter.SerializeSqoopRequest("hadoop", sqoopJob); Assert.IsTrue(payload.Contains(string.Format("{0}={1}", WebHCatConstants.File, Uri.EscapeDataString(sqoopJob.File)))); }
public void CanSerializeValidSqoopJobRequest_Command() { var sqoopJob = new SqoopJobCreateParameters() { Command = "show tables" }; var payloadConverter = new PayloadConverterBase(); var payload = payloadConverter.SerializeSqoopRequest("hadoop", sqoopJob); Assert.IsTrue(payload.Contains(string.Format("{0}={1}", WebHCatConstants.Command, Uri.EscapeDataString(sqoopJob.Command)))); }