Skip to content

Instantly share code, notes, and snippets.

interface Customer {
getEarnedDiscount(): number;
addToOrdersHistory(order: Order): void;
}
// Null Customer's implementation
class NotFoundCustomer implements Customer {
private DEFAULT_DISCOUNT: number = 1.0;
class Coordinates {
public x: number;
public y: number;
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
}
@trikitrok
trikitrok / ArgentRoseStoreTest.cs
Last active November 18, 2024 14:21
Argent Rose super lite tests with 100% coverage and no mutants surviving
using NUnit.Framework;
namespace ArgentRose.Tests;
public class ArgentRoseStoreTest
{
private const int MIN_QUALITY = 0;
private const int MAX_QUALITY = 50;
private const int SELLIN_LAST_DAY = 0;
private const int EXPIRED = -1;
@trikitrok
trikitrok / ArgentRoseStore.test.ts
Last active November 12, 2024 16:58
Argent Rose super lite tests with 100% coverage and no mutants surviving
import {ArgentRoseStore} from "../src/ArgentRoseStore";
import {Product} from "../src/Product";
describe("Game Score Board", () => {
const MIN_QUALITY = 0;
const MAX_QUALITY = 50;
const SELLIN_LAST_DAY = 0;
const EXPIRED = -1;
let store: ArgentRoseStore;
@trikitrok
trikitrok / ArgentRoseTest.php
Created November 12, 2024 16:54
Argent Rose super lite tests with 100% coverage and no mutants surviving
<?php
namespace tests;
use Codesai\TDD\ArgentRose\ArgentRoseStore;
use Codesai\TDD\ArgentRose\Product;
use PHPUnit\Framework\TestCase;
class ArgentRoseTest extends TestCase
{
@trikitrok
trikitrok / ArgentRoseStoreTest.java
Last active November 12, 2024 16:50
Argent Rose super lite tests with 100% coverage and no mutants surviving
package com.argentrose;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class ArgentRoseStoreTest {
public static final int MIN_QUALITY = 0;
@trikitrok
trikitrok / ArgentRoseStoreTest.cs
Created November 12, 2024 16:47
Argent Rose super lite tests with 100% coverage but some mutants surviving
using NUnit.Framework;
namespace ArgentRose.Tests;
public class ArgentRoseStoreTest
{
private const int MIN_QUALITY = 0;
private const int MAX_QUALITY = 50;
private const int SELLIN_LAST_DAY = 0;
private const int EXPIRED = -1;
@trikitrok
trikitrok / ArgentRoseStore.test.ts
Last active November 12, 2024 16:43
Argent Rose super lite tests with 100% coverage but some mutants surviving
import {ArgentRoseStore} from "../src/ArgentRoseStore";
import {Product} from "../src/Product";
describe("Game Score Board", () => {
const MIN_QUALITY = 0;
const MAX_QUALITY = 50;
const SELLIN_LAST_DAY = 0;
const EXPIRED = -1;
let store: ArgentRoseStore;
@trikitrok
trikitrok / ArgentRoseTest.php
Created November 12, 2024 16:39
Argent Rose super lite tests with 100% coverage but some mutants surviving
<?php
namespace tests;
use Codesai\TDD\ArgentRose\ArgentRoseStore;
use Codesai\TDD\ArgentRose\Product;
use PHPUnit\Framework\TestCase;
class ArgentRoseTest extends TestCase
{
@trikitrok
trikitrok / ArgentRoseStoreTest.java
Created November 12, 2024 16:36
Argent Rose super lite tests with 100% coverage but some mutants surviving
package com.argentrose;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class ArgentRoseStoreTest {
public static final int MIN_QUALITY = 0;