public void Map_Verify() { var settingWrong1 = new Map(string.Empty); var settingWrong2 = new Map(" "); var setting = new Map("output1"); Assert.Throws<InvalidOperationException>(() => { SettingSerializer.Serialize(settingWrong1); }); Assert.Throws<InvalidOperationException>(() => { SettingSerializer.Serialize(settingWrong2); }); Assert.DoesNotThrow(() => SettingSerializer.Serialize(setting)); Assert.Equal(SettingSerializer.Serialize(setting), "-map [output1]"); }
public void Map_Verify() { var settingWrong1 = new Map(string.Empty); var settingWrong2 = new Map(" "); var setting = new Map("output1"); Assert.Throws<InvalidOperationException>(() => { var s = settingWrong1.GetAndValidateString(); }); Assert.Throws<InvalidOperationException>(() => { var s = settingWrong2.GetAndValidateString(); }); Assert.DoesNotThrow(() => { var s = setting.GetAndValidateString(); }); Assert.Equal(setting.GetAndValidateString(), "-map [output1]"); }