public void Delete_weight_measurement_twice_should_fail_the_second_time() { // Arrange var bizLogic = new Weight(); var expectedId = Guid.NewGuid(); _ = bizLogic.Create(GenerateRandomWeightMeasurement(expectedId)); // Act var initialResult = bizLogic.Delete(expectedId); var secondResult = bizLogic.Delete(expectedId); // Assert Assert.AreEqual(initialResult.Outcome, Common.MetrikOutcome.NoContent, "Expected the initial delete to succeed"); Assert.AreEqual(secondResult.Outcome, Common.MetrikOutcome.NotFound, "Expected the second delete to fail"); }
public void Delete_weight_measurement_by_valid_ID() { // Arrange var bizLogic = new Weight(); var expectedId = Guid.NewGuid(); _ = bizLogic.Create(GenerateRandomWeightMeasurement(expectedId)); // Act var actual = bizLogic.Delete(expectedId); // Assert actual.Outcome.Should().Be(Common.MetrikOutcome.NoContent, actual.Message); }