dronov-qa80-201's People
dronov-qa80-201's Issues
CashBackHacker сервис сообщает пользователю купить еще на 1000 рублей в рамках конкретной траты 1000 рублей, чтобы получить максимальное количество кешбека.
Описание:
при прохождении теста на потраченную полную тысячу рублей сервис CashBackHacker сообщает пользователю, что ему нужно дополнительно докупать в рамках конкретной траты, чтобы получить максимальное количество кешбека.
Окружение:
windows 11
IntelliJ IDEA 2023.3.6 (Community Edition)
JUNIT4
TestNG
Java 11
Шаги:
код теста
@test
public void testRemainAmountEqualBoundary() {
CashbackHackService cashbackHackService = new CashbackHackService();
int amount = 1000; // amount равно границе
int expectedRemain = 0; // Ожидаемый остаток
int actualRemain = cashbackHackService.remain(amount);
Assert.assertEquals(actualRemain, expectedRemain);
}
ожидаемый результат:
-
запускаем тест командой gradlew test
-
Test Passed
BUILD SUCCESSFUL
при покупке на 1000 руб достигается максимальное количество кешбека в рамках конкретной траты
фактический результат:
Test Failed
java.lang.AssertionError: expected:<1000> but was:<0> at org.junit.Assert.fail(Assert.java:89)
Expected :1000
Actual :0
Task :test FAILED
CashbackHackServiceTest4 > testRemainAmountEqualBoundary FAILED
java.lang.AssertionError at CashbackHackServiceTest4.java:25
FAILURE: Build failed with an exception.
при покупке на 1000 руб сервис предлагает купить еще на 1000 руб в рамках конкретной траты
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.