github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/apiserver/testing/fakeauditlog.go (about) 1 // Copyright 2017 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package testing 5 6 import ( 7 "github.com/juju/testing" 8 9 "github.com/juju/juju/core/auditlog" 10 ) 11 12 // FakeAuditLog implements auditlog.AuditLog. 13 type FakeAuditLog struct { 14 testing.Stub 15 } 16 17 func (l *FakeAuditLog) AddConversation(m auditlog.Conversation) error { 18 l.Stub.AddCall("AddConversation", m) 19 return l.Stub.NextErr() 20 } 21 22 func (l *FakeAuditLog) AddRequest(m auditlog.Request) error { 23 l.Stub.AddCall("AddRequest", m) 24 return l.Stub.NextErr() 25 } 26 27 func (l *FakeAuditLog) AddResponse(m auditlog.ResponseErrors) error { 28 l.Stub.AddCall("AddResponse", m) 29 return l.Stub.NextErr() 30 } 31 32 func (l *FakeAuditLog) Close() error { 33 l.Stub.AddCall("Close") 34 return l.Stub.NextErr() 35 }