Exemplo n.º 1
0
        public void SubsequentProfileGets_ReturnTheSameProfileInstance()
        {
            // Arrange
            FileSystemProfileStorage storage = new FileSystemProfileStorage(_fileSystem);

            // Act
            IProfile resultOne = storage.Get("default");
            IProfile resultTwo = storage.Get("default");

            // Assert
            Assert.AreSame(resultOne, resultTwo);
        }
Exemplo n.º 2
0
        public void CreatingThenGettingAProfile_ReturnsTheSameInstance()
        {
            // Arrange
            FileSystemProfileStorage storage = new FileSystemProfileStorage(_fileSystem);

            // Act
            IProfile created = storage.Create("foo");
            IProfile gotten  = storage.Get("foo");

            // Assert
            Assert.AreSame(created, gotten);
        }
Exemplo n.º 3
0
        public void GettingAndIteratingOverProfiles_ReturnsTheSameInstances()
        {
            // Arrange
            FileSystemProfileStorage storage = new FileSystemProfileStorage(_fileSystem);

            // Act
            IProfile iterated = storage.First(p => p.Name == "default");
            IProfile gotten   = storage.Get("default");

            // Assert
            Assert.AreSame(iterated, gotten);
        }