Пример #1
0
        public void Create_new_success()
        {
            var map    = new MapTask <TestItem>();
            var result = map.Create();

            Assert.That(result is TestItem);
        }
Пример #2
0
        public void Create_return_null()
        {
            var map      = new MapTask <TestItem>();
            var instance = new TestEntity();
            var result   = map.Create(instance);

            Assert.That(result is TestItem);
        }
Пример #3
0
        public void Create_with_instance()
        {
            var map      = new MapTask <TestItem>();
            var instance = new TestItem {
                ItemId = 100
            };
            var result = map.Create(instance) as TestItem;

            Assert.That(result, Is.EqualTo(instance));
            Assert.That(result?.ItemId, Is.EqualTo(100));
        }