public void It_can_serialize_EndpointHeartbeat()
        {
            var body = ServiceControlBackend.Serialize(new EndpointHeartbeat
            {
                EndpointName = "My.Endpoint",
                ExecutedAt   = new DateTime(2016, 02, 01, 13, 59, 0, DateTimeKind.Utc),
                Host         = "Host",
                HostId       = Guid.Empty
            });

            Approver.Verify(Encoding.UTF8.GetString(body));
        }
        public void It_can_serialize_EndpointHeartbeat()
        {
            ConfigurationManager.AppSettings["ServiceControl/Queue"] = "SC";
            var settingsHolder = new SettingsHolder();
            var backend = new ServiceControlBackend(null, settingsHolder);

            var body = backend.Serialize(new EndpointHeartbeat
            {
                EndpointName = "My.Endpoint",
                ExecutedAt = new DateTime(2016, 02, 01, 13, 59, 0),
                Host = "Host",
                HostId = Guid.Empty
            });
            Approvals.Verify(Encoding.UTF8.GetString(body));
        }
        public void It_can_serialize_RegisterEndpointStartup()
        {
            var body = ServiceControlBackend.Serialize(new RegisterEndpointStartup
            {
                HostDisplayName = "Display name :-)",
                Endpoint        = "My.Endpoint",
                HostProperties  = new Dictionary <string, string>
                {
                    { "key1", "value1" },
                    { "key2", "value2" }
                },
                StartedAt = new DateTime(2016, 02, 01, 13, 59, 0, DateTimeKind.Utc),
                Host      = "Host",
                HostId    = Guid.Empty
            });

            Approver.Verify(Encoding.UTF8.GetString(body));
        }
        public void It_can_serialize_RegisterEndpointStartup()
        {
            ConfigurationManager.AppSettings["ServiceControl/Queue"] = "SC";
            var settingsHolder = new SettingsHolder();
            var backend = new ServiceControlBackend(null, settingsHolder);

            var body = backend.Serialize(new RegisterEndpointStartup
            {
                HostDisplayName = "Display name :-)",
                Endpoint = "My.Endpoint",
                HostProperties = new Dictionary<string, string>
                {
                    {"key1", "value1"},
                    {"key2", "value2"}
                },
                StartedAt = new DateTime(2016, 02, 01, 13, 59, 0),
                Host = "Host",
                HostId = Guid.Empty
            });
            Approvals.Verify(Encoding.UTF8.GetString(body));
        }