public void Name() { var name = Guid.NewGuid().ToString(); var i = new InitializeTopic(conn, name); Assert.AreEqual(name, i.Name); }
public async Task Create() { var random = new Random(); var name = "a" + random.Next() + "b"; var init = new InitializeTopic(name, connection); await init.RunAsync(); }
public void Setup() { var random = new Random(); this.name = string.Format("a{0}b", random.Next()); var init = new InitializeTopic(name, connection); init.Run(); }
public async Task Delete() { var random = new Random(); var name = string.Format("a{0}b", random.Next()); var client = Substitute.For <IBusManagementClient>(); var init = new InitializeTopic(client, name); await init.Delete(); await client.Received().TopicDelete(name); }
public async Task CreateExists() { var random = new Random(); var name = string.Format("a{0}b", random.Next()); var client = Substitute.For <IBusManagementClient>(); client.TopicExists(name).Returns(true); var init = new InitializeTopic(client, name); var e = await init.CreateIfNotExists(); Assert.IsTrue(e); await client.Received().TopicExists(name); await client.DidNotReceive().TopicCreate(name); }