public void CreateModel_MultipleTimes_CreatesManyModels() { // Arrange var connection = new FakeConnection(new RabbitServer()); // Act var result1 = connection.CreateModel(); var result2 = connection.CreateModel(); // Assert Assert.That(connection.Models, Has.Count.EqualTo(2)); Assert.That(connection.Models, Is.EquivalentTo(new[] { result1, result2 })); }
public void CreateModel_MultipleTimes_CreatesManyModels() { // Arrange var connection = new FakeConnection(new RabbitServer()); // Act var result1 = connection.CreateModel(); var result2 = connection.CreateModel(); // Assert Assert.That(connection.Models, Has.Count.EqualTo(2)); Assert.That(connection.Models, Is.EquivalentTo(new[] { result1, result2 })); }
public void CreateModel_CreatesANewModel() { // Arrange var connection = new FakeConnection(new RabbitServer()); // Act var result = connection.CreateModel(); // Assert Assert.That(connection.Models, Has.Count.EqualTo(1)); Assert.That(connection.Models, Is.EquivalentTo(new[] { result })); }
public void CreateModel_CreatesANewModel() { // Arrange var connection = new FakeConnection(new RabbitServer()); // Act var result = connection.CreateModel(); // Assert Assert.That(connection.Models,Has.Count.EqualTo(1)); Assert.That(connection.Models,Is.EquivalentTo(new[]{result})); }
public void Close_ClosesAllModels() { // Arrange var connection = new FakeConnection(new RabbitServer()); connection.CreateModel(); // Act connection.Close(); // Assert Assert.IsTrue(connection.Models.All(m => m.IsOpen == false)); Assert.IsTrue(connection.Models.All(m => m.IsClosed == true)); }
public void Close_ClosesAllModels() { // Arrange var connection = new FakeConnection(new RabbitServer()); connection.CreateModel(); // Act connection.Close(); // Assert Assert.IsTrue(connection.Models.All(m=>m.IsOpen == false)); Assert.IsTrue(connection.Models.All(m=>m.IsClosed == true)); }