public void Name_Generated_TwoCommandsWithDifferentGroups_ReturnsCorrectNameForEach() { var type = typeof(GeneratedNameTestCommand); var command1 = new GeneratedNameCacheTestCommand("test-one"); var command2 = new GeneratedNameCacheTestCommand("test-two"); Assert.Equal("test-one.GeneratedNameCacheTest", command1.Name); Assert.Equal("test-two.GeneratedNameCacheTest", command2.Name); }
public void Name_Generated_IsCached() { var type = typeof(GeneratedNameCacheTestCommand); var command1 = new GeneratedNameCacheTestCommand("test"); var cachedName = command1.GetCachedName(type); Assert.Equal(command1.Name, cachedName); var command2 = new GeneratedNameCacheTestCommand("test"); Assert.True(ReferenceEquals(command1.Name, command2.Name)); }