Exemple #1
0
        public async Task GetAreaByIdAsync_ValidData_OkAsync(ShapeType type, bool enable, long? x, long? y, long? z, long? radius, double expected)
        {
            await using var context = new SqliteContext();
            var target = new ShapeService(context);

            var request = new ShapeDto
            {
                Type = type,
                RadiusEnabled = enable,
                X = x,
                Y = y,
                Z = z,
                Radius = radius
            };
            var shapeId = await target.CreateAsync(request);

            var area = await target.GetAreaByIdAsync(shapeId);

            Assert.Equal(expected, area);
        }