コード例 #1
0
        public void KeyTest_ShouldReturnValidData()
        {
            var guid  = Guid.NewGuid().ToString();
            var error = new FigureError {
                Key = guid
            };

            Assert.AreEqual(guid, error.Key);
        }
コード例 #2
0
        public void MessageTest_ShouldReturnValidData()
        {
            var guid  = Guid.NewGuid().ToString();
            var error = new FigureError {
                Message = guid
            };

            Assert.AreEqual(guid, error.Message);
        }
コード例 #3
0
        public void FigureErrorTest_PropertiesShouldReturnValidData()
        {
            const string key     = "key";
            const string message = "msg";

            var exception = new FigureException(key, message);

            Assert.AreEqual(key, exception.FigureError.Key);
            Assert.AreEqual(message, exception.FigureError.Message);

            var figureError = new FigureError();

            exception.FigureError = figureError;
            Assert.AreEqual(figureError, exception.FigureError);

            exception.FigureError = null;
            Assert.IsNull(exception.FigureError);
        }