public void TestLogCategories(RpcLogCategory categoryToTest) { InboundGrpcEvent inboundEvent = new InboundGrpcEvent(Guid.NewGuid().ToString(), new Grpc.Messages.StreamingMessage { RpcLog = new Grpc.Messages.RpcLog { LogCategory = categoryToTest, } }); Assert.True(inboundEvent.IsLogOfCategory(categoryToTest)); }
public static bool IsLogOfCategory(this InboundGrpcEvent inboundEvent, RpcLogCategory categoryToCheck) { return(inboundEvent.Message.RpcLog.LogCategory.Equals(categoryToCheck)); }
public static bool IsMessageOfType(this InboundGrpcEvent inboundEvent, MessageType typeToCheck) { return(inboundEvent.MessageType.Equals(typeToCheck)); }