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

Update usage of Should().Equals in FirmwareTests #47962

Open
m-redding opened this issue Jan 23, 2025 · 1 comment
Open

Update usage of Should().Equals in FirmwareTests #47962

m-redding opened this issue Jan 23, 2025 · 1 comment
Labels
IoT Mgmt This issue is related to a management-plane library.

Comments

@m-redding
Copy link
Member

In Azure.ResourceManager.IotFirmwareDefense there are two tests in FirmwareTest.cs that do the following:

response.Value.Data.Name.Should().Equals(testFirmware.Name);

FirmwareTest.cs L48 / FirmwareTest.cs L61

Equals is not part of FluentAssertions so this statement simply is calling System.Object.Equals which returns a boolean and is not an assertion. See:

It should be updated to something like:

response.Value.Data.Name.Should().Be(testFirmware.Name);

However, testFirmware.Name is never set in the Setup method of this file and is null. I wasn't able to fix this since I don't know what the expected value should be.

@m-redding m-redding added Client This issue points to a problem in the data-plane of the library. IoT labels Jan 23, 2025
@jsquire jsquire added Mgmt This issue is related to a management-plane library. and removed Client This issue points to a problem in the data-plane of the library. labels Jan 24, 2025
@jsquire
Copy link
Member

jsquire commented Jan 24, 2025

//fyi: @ArthurMa1978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IoT Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

No branches or pull requests

2 participants