public void GeneralPropertyCheck()
        {
            var id = new SubscriptionEventName("schema", "abc");

            Assert.AreEqual("schema:abc", id.ToString());
            Assert.AreEqual("schema:abc".GetHashCode(), id.GetHashCode());
        }
        public void GeneralPropertyCheck_FromType()
        {
            var schema = new GraphSchema();
            var id     = new SubscriptionEventName(typeof(GraphSchema), "abc");

            Assert.AreEqual($"{schema.FullyQualifiedSchemaTypeName()}:abc", id.ToString());
            Assert.AreEqual($"{schema.FullyQualifiedSchemaTypeName()}:abc".GetHashCode(), id.GetHashCode());
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ApolloServerEventMonitorEndedLogEntry{TSchema}" /> class.
 /// </summary>
 /// <param name="server">The server that registered with the listener.</param>
 /// <param name="eventName">Name of the event that is no longer being monitored.</param>
 public ApolloServerEventMonitorEndedLogEntry(
     ApolloSubscriptionServer <TSchema> server,
     SubscriptionEventName eventName)
     : base(ApolloLogEventIds.ServerSubscriptionEventMonitorStarted)
 {
     _schemaTypeShortName       = typeof(TSchema).FriendlyName();
     this.SchemaTypeName        = typeof(TSchema).FriendlyName(true);
     this.SubscriptionEventName = eventName.ToString();
     this.ServerId = server.Id;
 }
        public void ApolloEventMonitorStarted_PropertyCheck()
        {
            var router = new Mock <ISubscriptionEventRouter>();
            var server = new ApolloSubscriptionServer <GraphSchema>(
                new GraphSchema(),
                new SubscriptionServerOptions <GraphSchema>(),
                router.Object);

            var eventName = new SubscriptionEventName("schema", "event");

            var entry = new ApolloServerEventMonitorStartedLogEntry <GraphSchema>(server, eventName);

            Assert.AreEqual(typeof(GraphSchema).FriendlyName(true), entry.SchemaTypeName);
            Assert.AreEqual(eventName.ToString(), entry.SubscriptionEventName);
            Assert.AreEqual(server.Id, entry.ServerId);
            Assert.AreNotEqual(entry.GetType().Name, entry.ToString());
        }