From 9e42911d61c6da6fff57b216c11db4b30c662cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Ottolini?= <56277304+agusotto96@users.noreply.github.com> Date: Mon, 8 Sep 2025 14:32:48 -0300 Subject: [PATCH] Create pnl_test.go --- src/domain/pnl/pnl_test.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/domain/pnl/pnl_test.go diff --git a/src/domain/pnl/pnl_test.go b/src/domain/pnl/pnl_test.go new file mode 100644 index 0000000..7c61dbe --- /dev/null +++ b/src/domain/pnl/pnl_test.go @@ -0,0 +1,34 @@ +package pnl + +import "testing" + +func TestPair_Calculate(t *testing.T) { + type fields struct { + ID PairID + BaseAsset Asset + QuoteAsset Asset + Trades []Trade + Calculations Calculations + } + tests := []struct { + name string + fields fields + wantErr bool + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tp := &Pair{ + ID: tt.fields.ID, + BaseAsset: tt.fields.BaseAsset, + QuoteAsset: tt.fields.QuoteAsset, + Trades: tt.fields.Trades, + Calculations: tt.fields.Calculations, + } + if err := tp.Calculate(); (err != nil) != tt.wantErr { + t.Errorf("Calculate() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +}