Add backend projects with core models and tests, setup Godot frontend

This commit is contained in:
sokol
2026-02-20 21:01:09 +03:00
parent fc3ad9f6db
commit f320aa50ed
14 changed files with 518 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
using MyBiz.Core;
namespace MyBiz.Tests;
public class ProductTests
{
[Fact]
public void Product_Creation_ShouldInitializeProperties()
{
// Arrange & Act
var product = new Product
{
Type = ProductType.Food,
Name = "Bread",
Category = ProductCategory.ConsumerGoods,
BasePrice = 10m
};
// Assert
Assert.Equal(ProductType.Food, product.Type);
Assert.Equal("Bread", product.Name);
Assert.Equal(ProductCategory.ConsumerGoods, product.Category);
Assert.Equal(10m, product.BasePrice);
}
[Fact]
public void Product_CurrentPrice_ShouldDefaultToBasePrice()
{
// Arrange
var product = new Product
{
BasePrice = 25m
};
// Act
product.CurrentPrice = product.BasePrice;
// Assert
Assert.Equal(25m, product.CurrentPrice);
}
}