public void Test_Failed_State_Draft_And_Publish_And_Publish() { TestCandidate candidate = new TestCandidate(); candidate.Publish(); candidate.Publish(); }
public void Test_StatusOn_Create_And_Publish() { TestCandidate candidate = new TestCandidate(); candidate.Publish(); AssertActiveState(candidate); }
public void Test_StatusOn_Create_And_Publish_And_Delete() { TestCandidate candidate = new TestCandidate(); candidate.Publish(); candidate.SoftDelete(); AssertDeletedState(candidate); }
public void Test_StatusOn_Create_And_Publish_And_Archive() { TestCandidate candidate = new TestCandidate(); candidate.Publish(); candidate.Archive(); AssertArchivedState(candidate); }
public void Test_Object_After_Activate() { TestCandidate candidate = new TestCandidate(); candidate.Publish(); // Assert.IsNull(candidate.PublishedBy); Assert.IsNotNull(candidate.PublishedOn); }
public void Bitfinex_SupportedPairs_Complete() { Assert.That(TestCandidate.SupportedTradingPairs.Count == 3); Assert.That(TestCandidate.IsTradingPairSupported(new TradingPair(Currency.BTC, Currency.USD))); Assert.That(TestCandidate.IsTradingPairSupported(new TradingPair(Currency.LTC, Currency.USD))); Assert.That(TestCandidate.IsTradingPairSupported(new TradingPair(Currency.LTC, Currency.BTC))); Assert.That(TestCandidate.DefaultPair == new TradingPair(Currency.BTC, Currency.USD)); }
public void Test_Failed_State_Draft_And_Publish_And_Archive_And_Activate_AndActivate() { TestCandidate candidate = new TestCandidate(); candidate.Publish(); candidate.Archive(); candidate.Activate(); candidate.Activate(); }
static void Main(string[] args) { while (true) { try { Console.WriteLine("Введите: Имя (не пустая строка)"); var _name = Console.ReadLine(); Console.WriteLine("Вес в кг (целое число, больше 0)"); var _weight = Console.ReadLine(); Console.WriteLine("Рост в см (целое число, больше 0)"); var _growth = Console.ReadLine(); Console.WriteLine("Возраст (целое число, больше 0)"); var _age = Console.ReadLine(); Console.WriteLine("Зрение (дробное число, от 0 до 1)"); var _eye = Console.ReadLine(); Console.WriteLine("Разделённый пробелами список вредных привычек и болезней (может быть пустым)"); var _troubles = Console.ReadLine(); var candidate = new Candidate(_name, _weight, _growth, _age, _eye, _troubles); Diagnostic.Run(candidate); var results = TestCandidate.Run(candidate).ToList(); if (results.Any(r => r.Value == MarkEnum.unsatisfactorily) || results.Where(r => r.Value == MarkEnum.satisfactorily).Count() >= 3) { Console.WriteLine($"Кандидат {candidate.name} не прошел тестирование"); Console.WriteLine("Проблемы:"); results.Where(r => r.Value != MarkEnum.good) .ToList() .ForEach(r => { Console.WriteLine(r.Comment); }); } else { Console.WriteLine($"Кандидат {candidate.name} подходит"); } } catch (Exception e) { Console.WriteLine(e.Message); } Console.WriteLine("Протестировать других кандидатов? (y/n)"); if (Console.ReadLine() != "y") { return; } Console.WriteLine(); } }
private static void AssertDeletedState(TestCandidate candidate) { Assert.IsTrue(candidate.IsDeleted); Assert.IsFalse(candidate.IsAlive); Assert.IsFalse(candidate.IsActive); Assert.IsFalse(candidate.IsArchived); Assert.IsFalse(candidate.IsDraft); Assert.IsTrue(candidate.isStateValid()); }
public void Test_Object_onCreate() { TestCandidate candidate = new TestCandidate(); Assert.IsNull(candidate.PublishedBy); Assert.IsNull(candidate.PublishedOn); Assert.IsNull(candidate.TrueFalse1); Assert.IsNull(candidate.TrueFalse2); Assert.IsNull(candidate.Integer1); Assert.IsNull(candidate.Integer2); Assert.IsNull(candidate.Text1); Assert.IsNull(candidate.Text2); Assert.IsNull(candidate.Text3); Assert.IsNull(candidate.Text4); }
public void Test_Failed_State_Draft_And_Archive() { TestCandidate candidate = new TestCandidate(); candidate.Archive(); }
public void Test_StatusOn_Create() { TestCandidate candidate = new TestCandidate(); AssertDraftState(candidate); }