public void CountAfterClearTest(int expected) { // Arrange var factory = SkillFactory.GetInstance(); var brainState = new BrainState(); _provider.Setup(p => p.GetConversationState <BrainState>(_context.Object)) .Returns(brainState); // Act SkillFactory.Clear(); var actual = SkillFactory.Count; // Assert Assert.Equal(expected, actual); }
public void CountSkillsExistingAgainTest() { // Arrange var factory = SkillFactory.GetInstance(); var brainState = new BrainState(); _provider.Setup(p => p.GetConversationState <BrainState>(_context.Object)) .Returns(brainState); // Act SkillFactory.Clear(); var skill = factory.GetSkill("greetings", _context.Object, _provider.Object); var skill2 = factory.GetSkill("greetings", _context.Object, _provider.Object); var count = SkillFactory.Count; // Assert Assert.Equal(1, count); }
public void ClearAfterInitSingleSkillTest(int expected) { // Arrange var factory = SkillFactory.GetInstance(); var brainState = new BrainState(); _provider.Setup(p => p.GetConversationState <BrainState>(_context.Object)) .Returns(brainState); // Act SkillFactory.Clear(); var skill = factory.GetSkill("greetings", _context.Object, _provider.Object); SkillFactory.Clear(); var actual = SkillFactory.Count; // Assert Assert.Equal(expected, actual); }