Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remaining list of assertion not implemented #4

Open
1 of 2 tasks
dicko2 opened this issue Aug 22, 2023 · 2 comments
Open
1 of 2 tasks

Remaining list of assertion not implemented #4

dicko2 opened this issue Aug 22, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@dicko2
Copy link
Collaborator

dicko2 commented Aug 22, 2023

Feature request

Type

  • - Enhancement - completely new feature
  • - Improvement - make what we have better

Asserts TODO

Remaining list of assertion not implemented in a code fix

  • Assert.Greater
  • Assert.GreaterOrEqual
  • Assert.Less
  • Assert.LessOrEqual
  • Assert.Positive
  • Assert.Negative
  • Assert.IsNotAssignableFrom
  • Assert.Catch
  • Assert.CatchAsync
  • Assert.Pass
  • Assert.Fail
  • Assert.Ignore
  • Assert.Inconclusive
  • String Assert
  • Collection Assert
  • File Assert
  • Directory Assert
@dicko2 dicko2 added the enhancement New feature or request label Aug 22, 2023
@dicko2
Copy link
Collaborator Author

dicko2 commented Nov 1, 2023

IsInstanceOf
IsNotNull

Are common ones that are missing

IsTrue seems to have a bug

Assert.IsTrue(actual.Items.Count > 0);
// converts to
actual.Items.Count > 0.ShouldBeTrue();

@dicko2
Copy link
Collaborator Author

dicko2 commented Mar 13, 2024

var BoosterPropertyItems = new List<int>();
BoosterPropertyItems.Add(1548);

            Assert.NotNull(BoosterPropertyItems.SingleOrDefault(o => o == 1548));
            Assert.Null(BoosterPropertyItems.SingleOrDefault(o => o == 6542));
// converts to
BoosterPropertyItems.SingleOrDefault(o => o == 1548).ShouldNotBeNull();
BoosterPropertyItems.SingleOrDefault(o => o == 6542).ShouldBeNull();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant