public void TwoTaskOutputKindsWithTheSameTextAreEqual_UsingWeakTypedEqualsMethod() { object kind1 = TaskOutputKind.Custom("alice"); object kind2 = TaskOutputKind.Custom("alice"); Assert.True(kind1.Equals(kind2)); }
public void TwoTaskOutputKindsWithDifferentlyCasedTextAreNotEqual_UsingWeakTypedEqualsMethod() { object kind1 = TaskOutputKind.Custom("alice"); object kind2 = TaskOutputKind.Custom("Alice"); Assert.False(kind1.Equals(kind2)); }
public void TwoTaskOutputKindsWithTheSameTextAreEqual_UsingStrongTypedEqualsMethod() { var kind1 = TaskOutputKind.Custom("alice"); var kind2 = TaskOutputKind.Custom("alice"); Assert.True(kind1.Equals(kind2)); }
public void TwoTaskOutputKindsWithDifferentlyCasedTextAreNotEqual_UsingInequalityOperator() { var kind1 = TaskOutputKind.Custom("alice"); var kind2 = TaskOutputKind.Custom("Alice"); Assert.True(kind1 != kind2); }
public void TwoTaskOutputKindsWithTheSameTextAreEqual_UsingInequalityOperator() { var kind1 = TaskOutputKind.Custom("alice"); var kind2 = TaskOutputKind.Custom("alice"); Assert.False(kind1 != kind2); }
public void GetTaskOutputStoragePathReturnsExpectedValue() { const string taskId = "test-task"; var taskStorage = new TaskOutputStorage(new Uri("http://example.test/"), taskId); var taskLogPath = taskStorage.GetOutputStoragePath(TaskOutputKind.TaskLog); Assert.Equal($"{taskId}/${TaskOutputKind.TaskLog.ToString()}/", taskLogPath); taskLogPath = taskStorage.GetOutputStoragePath(TaskOutputKind.TaskOutput); Assert.Equal($"{taskId}/${TaskOutputKind.TaskOutput.ToString()}/", taskLogPath); taskLogPath = taskStorage.GetOutputStoragePath(TaskOutputKind.TaskPreview); Assert.Equal($"{taskId}/${TaskOutputKind.TaskPreview.ToString()}/", taskLogPath); taskLogPath = taskStorage.GetOutputStoragePath(TaskOutputKind.Custom("foo")); Assert.Equal($"{taskId}/${TaskOutputKind.Custom("foo").ToString()}/", taskLogPath); }
public void GetTaskOutputStoragePathReturnsExpectedValue() { const string taskId = "test-task"; var task = new CloudTask(taskId, "test"); var taskLogPath = task.GetOutputStoragePath(TaskOutputKind.TaskLog); Assert.Equal($"{taskId}/${TaskOutputKind.TaskLog.ToString()}", taskLogPath); taskLogPath = task.GetOutputStoragePath(TaskOutputKind.TaskOutput); Assert.Equal($"{taskId}/${TaskOutputKind.TaskOutput.ToString()}", taskLogPath); taskLogPath = task.GetOutputStoragePath(TaskOutputKind.TaskPreview); Assert.Equal($"{taskId}/${TaskOutputKind.TaskPreview.ToString()}", taskLogPath); taskLogPath = task.GetOutputStoragePath(TaskOutputKind.Custom("foo")); Assert.Equal($"{taskId}/${TaskOutputKind.Custom("foo").ToString()}", taskLogPath); }
public void ATaskOutputKindIsNotEqualToNull_UsingStrongTypedEqualsMethod() { var kind = TaskOutputKind.Custom("alice"); Assert.False(kind.Equals(NullKind)); }
public void CustomTaskOutputKindStringisesToItsText() { Assert.Equal("alice", TaskOutputKind.Custom("alice").ToString()); }
public void CannotCreateATaskOutputKindWithEmptyText() { var ex = Assert.Throws <ArgumentException>(() => TaskOutputKind.Custom("")); Assert.Equal("text", ex.ParamName); }
public void NullIsNotEqualToATaskOutputKind_UsingInequalityOperator() { var kind = TaskOutputKind.Custom("alice"); Assert.True(NullKind != kind); }
public void ATaskOutputKindIsNotEqualToNull_UsingEqualityOperator() { var kind = TaskOutputKind.Custom("alice"); Assert.False(kind == NullKind); }
public void ATaskOutputKindIsNotEqualToNull_UsingWeakTypedEqualsMethod() { object kind = TaskOutputKind.Custom("alice"); Assert.False(kind.Equals(null)); }