public void TestCallBuildWithDecision_ShouldReturnFour() { // Arrange var dataSetElements = new DataSetElements(); // Act var dataSetNumber = dataSetElements .WithDecision() .Build(); // Assert Assert.AreEqual(4, dataSetNumber); }
public void TestCallBuildWithDecisionAndTrustedDeviceInfo_ShouldReturnTwelve() { // Arrange var dataSetElements = new DataSetElements(); // Act var dataSetNumber = dataSetElements .WithDecision() .WithTrusted() .Build(); // Assert Assert.AreEqual(12, dataSetNumber); }
public void TestCallBuildWith_Decision_TrustedDeviceInfo_BehavioSec_ShouldReturnTwentyfour() { // Arrange var dataSetElements = new DataSetElements(); // Act var dataSetNumber = dataSetElements .WithDecision() .WithTrusted() .Build(); // Assert Assert.AreEqual(28, dataSetNumber); }
private DataSetElements GetDataSetElementsFromExpectedValueAfterBuild(int expectedValue) { var dse = new DataSetElements(); var info = new DataSetElements().WithInfo().Build(); if ((expectedValue & info) == info) { dse.WithInfo(); } var velocity = new DataSetElements().WithVelocity().Build(); if ((expectedValue & velocity) == velocity) { dse.WithVelocity(); } var decision = new DataSetElements().WithDecision().Build(); if ((expectedValue & decision) == decision) { dse.WithDecision(); } var trusted = new DataSetElements().WithTrusted().Build(); if ((expectedValue & trusted) == trusted) { dse.WithTrusted(); } var behavioSec = new DataSetElements().WithBehavioSec().Build(); if ((expectedValue & behavioSec) == behavioSec) { dse.WithBehavioSec(); } if (expectedValue != dse.Build()) { throw new AccessException(AccessErrorType.INVALID_DATA, "Expected value and DataSetElements.Build() value are different."); } return(dse); }