Ejemplo n.º 1
0
        public async void ClientCanUpdateServerName()
        {
            var client            = new PostmarkClient(WRITE_TEST_SERVER_TOKEN);
            var serverName        = _serverBaseName + DateTime.Now.ToString("o");
            var nonModifiedServer = await client.GetServerAsync();

            var updatedServer = await client.EditServerAsync(name : serverName);

            var modifiedServer = await client.GetServerAsync();

            Assert.False(nonModifiedServer.Name == updatedServer.Name, "Updated server name should be different than current name");
            Assert.True(serverName == updatedServer.Name, "Updated server name returned from EditServer should be the same as the value passed in.");
            Assert.True(serverName == modifiedServer.Name, "Updated server name returned from subsequent call to GetServer should show new name.");
        }
Ejemplo n.º 2
0
        public async Task ClientCanUpdateServerName()
        {
            var client            = new PostmarkClient(WRITE_TEST_SERVER_TOKEN);
            var serverName        = "test-server " + DateTime.Now.ToString("o");
            var nonModifiedServer = await client.GetServerAsync();

            var updatedServer = await client.EditServerAsync(name : serverName);

            var modifiedServer = await client.GetServerAsync();

            Assert.AreNotEqual(nonModifiedServer.Name, updatedServer.Name, "Updated server name should be different than current name");
            Assert.AreEqual(serverName, updatedServer.Name, "Updated server name returned from EditServer should be the same as the value passed in.");
            Assert.AreEqual(serverName, modifiedServer.Name, "Updated server name returned from subsequent call to GetServer should show new name.");
        }