public void Sends_Message_And_Args_To_Verbose_Log() { // Arrange var(_, log, entity) = Repository_Setup.Get(); var message = Rnd.Str; var args = new object[] { Rnd.Int, Rnd.Int }; // Act entity.WriteToLogTest(message, args); // Assert log.Received().Vrb(message, args); }
public async Task Logs_Query_To_Verbose() { // Arrange var(_, log, repo) = Repository_Setup.Get(); var foo = new Repository_Setup.Foo { Id = LongId <Repository_Setup.FooId>() }; // Act await repo.CreateAsync(foo); // Assert log.ReceivedWithAnyArgs().Vrb(Arg.Any <string>(), Arg.Any <object[]>()); }
public async Task Calls_Client_GetCreateQuery() { // Arrange var(client, _, repo) = Repository_Setup.Get(); var foo = new Repository_Setup.Foo { Id = LongId <Repository_Setup.FooId>() }; // Act await repo.CreateAsync(foo); // Assert client.Received().GetCreateQuery <Repository_Setup.Foo>(); }
public async Task Calls_Client_GetRetrieveQuery() { // Arrange var(client, _, repo) = Repository_Setup.Get(); var value = Rnd.Lng; // Act await repo.RetrieveAsync <Repository_Setup.FooModel>(new Repository_Setup.FooId { Value = value }); // Assert client.Received().GetRetrieveQuery <Repository_Setup.Foo, Repository_Setup.FooModel>(value); }
public async Task Logs_Query_To_Verbose() { // Arrange var(_, log, repo) = Repository_Setup.Get(); var value = Rnd.Lng; // Act await repo.RetrieveAsync <Repository_Setup.FooModel>(new Repository_Setup.FooId { Value = value }); // Assert log.ReceivedWithAnyArgs().Vrb(Arg.Any <string>(), Arg.Any <object[]>()); }
public async Task Calls_Client_GetUpdateQuery() { // Arrange var(client, _, repo) = Repository_Setup.Get(); var value = Rnd.Lng; var model = new Repository_Setup.FooModel { Id = new() { Value = value } }; // Act await repo.UpdateAsync(model); // Assert client.Received().GetUpdateQuery <Repository_Setup.Foo, Repository_Setup.FooModel>(value); }
public async Task Logs_Query_To_Verbose() { // Arrange var(_, log, repo) = Repository_Setup.Get(); var value = Rnd.Lng; var model = new Repository_Setup.FooModel { Id = new() { Value = value } }; // Act await repo.UpdateAsync(model); // Assert log.ReceivedWithAnyArgs().Vrb(Arg.Any <string>(), Arg.Any <object[]>()); } }