public void Create_ThrowsException_WhenProfileWithSameNameAlreadyExists() { // Arrange FileSystemProfileStorage storage = new FileSystemProfileStorage(_fileSystem); // Act storage.Create("default"); }
public void Create_CreatesNewCSV_WithTheNameOfTheProfile() { // Arrange FileSystemProfileStorage storage = new FileSystemProfileStorage(_fileSystem); // Act storage.Create("new"); // Assert Assert.IsTrue(_fileSystem.FileExists(Path.Combine(FileSystemProfileStorage.PROFILE_FOLDER_PATH, "new.csv"))); }
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); }
public void CreatingAndIteratingOverProfiles_ReturnsTheSameInstances() { // Arrange FileSystemProfileStorage storage = new FileSystemProfileStorage(_fileSystem); // Act IProfile created = storage.Create("foo"); IProfile iterated = storage.First(p => p.Name == "foo"); // Assert Assert.AreSame(iterated, created); }