コード例 #1
0
        public static string GenerateCode(int id)
        {
            var googleQr = new GoogleQr($"techtober.azurewebsites.net/events/chooseevent/{id}", "200x200", true);
            //var qrImage = googleQr.Render();
            var qrPath = googleQr.ToString();

            return(qrPath);
        }
コード例 #2
0
        public void ShouldRaiseErrorWithoutData()
        {
            _qrCode.Data = null;
            var ex = Assert.Throws <Exception>(() => _qrCode.ToString());

            Assert.That(ex.Message, Is.EqualTo("Data is required"));
        }