public async Task RemoveAsync_RemoveSingleNumber_CountZero() { //Arrange var value = new Faker().Random.Number(); var holder = new NumbersHolder(); holder.Add(value); //Act await holder.RemoveAsync(); var result = holder.Count; //Assert Assert.Equal(value, result); result.Should().Be(value); }
public void Add_SingleNumber_ResultsSameSingleNumber() { //Arrange var holder = new NumbersHolder(); int number = default; //Act holder.Add(number); //holder.Add(3); var result = holder.Fetch(); //Assert // Assert.Equal(new[] { number }, result); // Assert.Single(result); // Assert.Single(result, number); using (new AssertionScope()) { //5.Should().Be(-5); result.Should().ContainSingle().And.Contain(number); } }