Git Product home page Git Product logo

dronov-qa80-201's People

Contributors

proxdme avatar

Watchers

 avatar

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);
}

ожидаемый результат:

  1. запускаем тест командой gradlew test

  2. 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 руб в рамках конкретной траты

11

12

13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.