(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestEnvironment_Basic(t *testing.T) { |
| 53 | env := newEnvironment(newMockChain(t)) |
| 54 | |
| 55 | assert.False(t, env.Has("good_key")) |
| 56 | env.chain.assert(t, success) |
| 57 | |
| 58 | env.Put("good_key", 123) |
| 59 | env.chain.assert(t, success) |
| 60 | |
| 61 | assert.True(t, env.Has("good_key")) |
| 62 | assert.NotNil(t, env.Get("good_key")) |
| 63 | assert.Equal(t, 123, env.Get("good_key").(int)) |
| 64 | env.chain.assert(t, success) |
| 65 | |
| 66 | assert.False(t, env.Has("bad_key")) |
| 67 | env.chain.assert(t, success) |
| 68 | |
| 69 | assert.Nil(t, env.Get("bad_key")) |
| 70 | env.chain.assert(t, failure) |
| 71 | } |
| 72 | |
| 73 | func TestEnvironment_Delete(t *testing.T) { |
| 74 | env := newEnvironment(newMockChain(t)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…