Esempio n. 1
0
        public void EntityContext_AddEntity_Success_Test()
        {
            var handler = new FakeEntityContext(new FakeEntity());

            const bool expected = true;
            var        actual   = handler.AddEntity(new FakeEntity());

            actual.Should().Be(expected);
        }
Esempio n. 2
0
        public void EntityContext_AddEntity_AlreadyExists_Test()
        {
            var entity  = new FakeEntity();
            var handler = new FakeEntityContext(new FakeEntity());

            handler.AddEntity(entity);

            const bool expected = true;
            var        actual   = handler.Contains(entity);

            actual.Should().Be(expected);
        }
Esempio n. 3
0
        public void EntityContext_ContainsId_Success_Test()
        {
            const long id = 1;

            var entity = new FakeEntity {
                ID = id
            };
            var handler = new FakeEntityContext(new FakeEntity());

            handler.AddEntity(entity);

            const bool expected = true;
            var        actual   = handler.Contains(id);

            actual.Should().Be(expected);
        }