Esempio n. 1
0
        public void op_ToEntity_whenNullValue()
        {
            var obj = new Record<string>
                          {
                              Value = null
                          };

            Assert.Null(obj.ToEntity());
        }
Esempio n. 2
0
        public void op_ToEntity()
        {
            var obj = new Record<int>
                          {
                              Value = 123
                          };

            const string expected = "123";
            var actual = obj.ToEntity();

            Assert.Equal(expected, actual);
        }
Esempio n. 3
0
        public void op_ToEntity_whenIEntity()
        {
            const string expected = "123";

            var value = new Mock<IEntity>();
            value
                .Setup(x => x.ToEntity())
                .Returns(expected)
                .Verifiable();

            var obj = new Record<IEntity>
                          {
                              Value = value.Object
                          };

            var actual = obj.ToEntity();

            Assert.Equal(expected, actual);

            value.VerifyAll();
        }