(t *testing.T)
| 28 | } |
| 29 | |
| 30 | func TestDuration_Constructors(t *testing.T) { |
| 31 | tm := time.Second |
| 32 | |
| 33 | t.Run("reporter", func(t *testing.T) { |
| 34 | reporter := newMockReporter(t) |
| 35 | value := NewDuration(reporter, tm) |
| 36 | value.IsEqual(tm) |
| 37 | value.chain.assert(t, success) |
| 38 | }) |
| 39 | |
| 40 | t.Run("config", func(t *testing.T) { |
| 41 | reporter := newMockReporter(t) |
| 42 | value := NewDurationC(Config{ |
| 43 | Reporter: reporter, |
| 44 | }, tm) |
| 45 | value.IsEqual(tm) |
| 46 | value.chain.assert(t, success) |
| 47 | }) |
| 48 | |
| 49 | t.Run("chain", func(t *testing.T) { |
| 50 | chain := newMockChain(t) |
| 51 | value := newDuration(chain, &tm) |
| 52 | assert.NotSame(t, value.chain, chain) |
| 53 | assert.Equal(t, value.chain.context.Path, chain.context.Path) |
| 54 | }) |
| 55 | } |
| 56 | |
| 57 | func TestDuration_Raw(t *testing.T) { |
| 58 | reporter := newMockReporter(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…