示例#1
0
 public void GetPreset_Without_Authentication_Throws_AuphonicException()
 {
     Assert.That(() => _auphonic.GetPreset(null), Throws
                 .InstanceOf <AuphonicException>()
                 .And.Property("ErrorCode").EqualTo("")
                 .And.Property("ErrorMessage").EqualTo(MessageNoCredentials));
 }
        public void Invoke_GetPreset_Returns_Result()
        {
            HasAccessToken();
            IsDependentOn("Invoke_CreatePreset_Returns_Result");

            Preset preset = null;

            Assert.That(() => preset = _auphonic.GetPreset(_preset.Uuid), Throws.Nothing);
            Assert.That(preset, Is.Not.Null);
            Assert.Multiple(() =>
            {
                Assert.That(preset.Uuid, Is.EqualTo(_preset.Uuid), "Uuid");
                Assert.That(preset.PresetName, Is.EqualTo(_preset.PresetName), "PresetName");
            });
        }