public Topic CreateTopicWithSchema(string topicId, string schemaId, Encoding encoding) { var createTopicWithSchemaSampleObject = new CreateTopicWithSchemaSample(); var topic = createTopicWithSchemaSampleObject.CreateTopicWithSchema(ProjectId, topicId, schemaId, encoding); TempTopicIds.Add(topicId); return(topic); }
public void CreateTopicWithSchema() { string schemaId = "testSchemaForTopicCreationWithSchema" + _pubsubFixture.RandomName(); var schema = _pubsubFixture.CreateAvroSchema(schemaId); string topicId = "testTopicForTopicCreationWithSchema" + _pubsubFixture.RandomName(); var newlyCreatedTopic = _createTopicWithSchemaSample.CreateTopicWithSchema(_pubsubFixture.ProjectId, topicId, schema.Name, Encoding.Json); _pubsubFixture.TempTopicIds.Add(topicId); var topic = _pubsubFixture.GetTopic(topicId); Assert.Equal(newlyCreatedTopic, topic); }