public void Deserialize_Should_Work_For_Valid_Input() { var lockTime = DateTime.Now; var userName = new Bogus.Faker().Internet.UserName(); var originalLaunchLock = new LaunchLock() { FileName = FileName, Username = userName, LockTime = lockTime, IsValid = true }; var input = JsonOperations.Serialize(originalLaunchLock); var launchLock = JsonOperations.Deserialize(FileName, input); launchLock.IsValid.Should().Be(true); launchLock.FileName.Should().Be(FileName); launchLock.LockTime.Should().BeCloseTo(lockTime); launchLock.Username.Should().Be(userName); }
public void Deserialize_Should_Work_For_Invalid_Input() { var launchLock = JsonOperations.Deserialize(FileName, "lock"); launchLock.IsValid.Should().Be(false); }