Dev2.Core.Tests.Environments.EnviromentRepositoryTest.EnvironmentRepositorySaveWithSingleExistingItemExpectedReplacesItem C# (CSharp) Method

EnvironmentRepositorySaveWithSingleExistingItemExpectedReplacesItem() private method

        public void EnvironmentRepositorySaveWithSingleExistingItemExpectedReplacesItem()
        {
            // DO NOT use mock as test requires IEquatable of IEnvironmentModel
            var c1 = CreateMockConnection();
            //var wizard = new Mock<IWizardEngine>();
            var e1 = new EnvironmentModel(Guid.NewGuid(), c1.Object);

            var source = new Mock<IEnvironmentModel>();
            var repo = new TestEnvironmentRespository(source.Object, e1);
            var startCount = repo.All().Count;

            repo.Save(e1);

            Assert.AreEqual(startCount, repo.All().Count);
        }
EnviromentRepositoryTest