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

infrastrucutre test cases #1074

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

samarthgupta1
Copy link

I have written remaining test cases for infrastructure module and some for Cms module1:

  1. test/SimplCommerce.Infrastructure.Tests/CurrencyHelperTests.cs
  2. test/SimplCommerce.Infrastructure.Tests/ReflectionHelperTests.cs
  3. test/SimplCommerce.Module.Cms.Tests/Controllers/MenuApiControllerTests.cs

@samarthgupta1
Copy link
Author

cannot merge it

Copy link
Member

@hishamco hishamco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format and remove unnecessary comments

@@ -1,6 +1,7 @@
{
"ConnectionStrings": {
"DefaultConnection": "Server=.;Database=SimplCommerce;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true"
"DefaultConnection": "server=DotNetFSD\\SQLEXPRESS; database=SimplCommerce; user id=sa; password=pass@123;trustservercertificate=true",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this change

@@ -0,0 +1 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty?!!

Comment on lines +8 to +10
using SimplCommerce.Infrastructure.Helpers;


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
using SimplCommerce.Infrastructure.Helpers;
using SimplCommerce.Infrastructure.Helpers;

}

[Fact]
public void IsZeroDecimalCurrencies_WithUnknownCurrency_ReturnsFalse()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use Theory for the above tests instead of Fact

Assert.False(result);
}
[Fact]
public void IsZeroDecimalCurrencies_WithUnknown2Currency_ReturnsFalse()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Assert.False(result);

}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra whitespace

Assert.True(createdMenu.IsPublished);
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespaces!!

using SimplCommerce.Module.Core.Data;
using SimplCommerce.Module.Core.Extensions;
using SimplCommerce.Module.Core.Models;
using Xunit;

namespace SimplCommerce.Module.Core.Tests.Components
/*namespace SimplCommerce.Module.Core.Tests.Components
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

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

Successfully merging this pull request may close these issues.

None yet

2 participants